Messages in this thread |  | | Date | Sun, 22 May 2011 19:16:17 -0700 | | Subject | Re: [PATCH 1/3] do collectcfiles work in perl itself, eschew shell pipeline | | From | "Randy Dunlap" <> |
| |
On Sat, May 21, 2011 1:21 am, Jim Cromie wrote:
> sub collectcfiles { > - my @file > - = `cat .tmp_versions/*.mod | grep '.*\.ko\$' | sed s/\.ko$/.mod.c/`; > + my @file; > + while (<.tmp_versions/*.mod>) { > + open my $fh, '<', $_ or die "cant open $_: $!\n";
Use either "can't" or "cannot". "cant" is a different word.
> + push (@file, > + grep s/\.ko/.mod.c/, # change the suffix > + grep m/.+\.ko/, # find the .ko path > + <$fh>); # lines in opened file > + } > chomp @file; > return @file; > }
-- ~Randy
|  |