Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Searching a file and then opening it

by smokemachine (Hermit)
on Nov 07, 2006 at 17:09 UTC ( [id://582695] : note . print w/replies, xml ) Need Help??


in reply to Searching a file and then opening it

perl -e '$name = shift || die "name?!"; $dir = shift || "."; $time = s +hift || 1; while(<$dir/* >){open FILE, $_ if scalar localtime((stat)[10]) < $time && /$name/}' +test . 123