in reply to searching folder for specific files
You can use opendir, readdir, and closedir and use a regexp or other file-test operation against each file found to determine if it matches your criteria:do_something($_) foreach (<*.swf>);
Or, if you need to recurse into subdirectories, you should consider File::Find. I'll let the documentation at CPAN illuminate that one for you.opendir FOO, $dir or die $@; foreach (readdir FOO) { do_something($_) if /\.swf$/; } closedir FOO;
|
|---|