in reply to Integrating System commands with regex's

You might consider using File::Find. You basically write a "wanted" sub that does all the work on the file to include determining if it is the right file. The "find" method in File::Find will do all the tedious work to include recursing folders.
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");
Have fun with it.

-Jim