#!D:/perl/bin/perl.exe -w use strict; use File::Find; my @list = qw(.); find ( \&recurse, @list ); sub recurse { my $file = $File::Find::name; productionize ( $file ); } sub productionize { my $fileName = shift; return if $fileName !~ /[\w]+\.(?:cgi|p[lm])$/; print "Processing $fileName\n"; open FILE, "<$fileName" or die "Can't open $fileName for reading: $!"; #do stuff close FILE; } #### Processing ./blobtest.pl Processing ./form.pl Processing ./functional.pl Processing ./images.cgi Processing ./index.pl Processing ./upload.cgi Processing ./utils/debug.pl Can't open ./utils/debug.pl for reading: No such file or directory at correct.pl line 17.