
Paul
Enthusiast
Feb 16, 2002, 10:54 AM
Views: 843
|
|
Re: [Alain] Random Picture Loading
|
|
|
How about just doing something like: [perl] opendir DIR, "/some/dir" or die $!; my @img = grep { /\.(jpg|gif)$/i } readdir(DIR); closedir DIR; my $rand = $img[rand @img]; [/perl] Then $rand has the image name.
(This post was edited by RedRum on Feb 16, 2002, 10:55 AM)
|