lkml.org 
[lkml]   [2011]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/3] do collectcfiles work in perl itself, eschew shell pipeline
From
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



\
 
 \ /
  Last update: 2011-05-23 04:19    [W:0.078 / U:15.332 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site