in reply to Integrating System commands with regex's
Have fun with it.use strict; use File::Find; sub wanted{ # $_ is the name of the file in the recursed folder my $filename = $_; # lets only test files that end with .sql return if $filename !~ /^.*\.sql$/; # when called we will be in the recursed folder # so file names can be tested with out the entire path if (-f $filename){ print "Got something called ", $File::Find::name, "\n"; } } find({wanted => \&wanted, no_chdir => 1}, "/home/jroberts");
-Jim
|
|---|