Re: [PATCH 1/3] do collectcfiles work in perl itself, eschew shellpipeline

From: Randy Dunlap
Date: Sun May 22 2011 - 22:16:24 EST


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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/