in reply to path greping
No doubt there will also be Monks suggesting you use the File::Find module instead -- it's a cleaner solution to running a command through system() to get the directory scan results you want.system("find /clear/pp_00/ngbb/ -name '*.txt' > CCfiles"); open (OUT , "CCfiles" ) or die " can't open CCfiles\n"; while (<OUT>) { # Original code # $_ =~ m/^//\w+////; # print "the someName dir is $_\n"; my @Result = split ( /\//, $_ ); print "the someName dir is $Result[1]\n"; }
--t. alex
but my friends call me T.
Update: My 300th node! Thanks everyone!!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: path greping
by grep (Monsignor) on Aug 30, 2002 at 03:38 UTC |