in reply to help with search script
If you know all the directories, as your code seems to indicate, a simple way would be to define them as an array like this:
Then loop over them like this:my @paths_to_images = ("/webpics/originals/", "/webpics/itemthumb/", "/webpics/itemmed/");
You could either take the code you have an put it into the for loop block, or make what you have a sub and call it where my comment is.foreach my $dir (@paths_to_images) { # Call the code you have for one directory now }
For more complete directory recursion, use something like File::Find or roll your own using opendir/readdir/closedir.
|
---|
In Section
Seekers of Perl Wisdom