in reply to Re^2: Can figure out a way to get File::Grep's fgrep to chomp matches
in thread Can figure out a way to get File::Grep's fgrep to chomp matches
chomp doesn’t return quite like that. This should work–
my @line = map { chomp; $_ } fgrep { /^[2-6] .+$/ } *DATA;
But maybe this is better–
chomp( my @line = fgrep { /^[2-6] .+$/ } *DATA );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Can figure out a way to get File::Grep's fgrep to chomp matches
by Lady_Aleena (Priest) on May 14, 2017 at 00:19 UTC |