I like this idea:
opendir(DIR,$directory) or die "$!";
my @pictures = grep {/\.jpg$/i} readdir DIR;
close (DIR);
But that only get's ".jpg" files. But I have others in there as well such as ".JPG" ".mpg" ".avi" etc... Can I add this to the code above?
By doing this
my $picture = $query->param('Picture');
my $directory = $query->param('directory');
I get my directory and all the pictures in the Directory, but I also get "." and ".." in my $picture variable. How do I do this w/o getting the "." and ".."?
I assume the $Picture variable is...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.