Do you know where your variables are? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I did a text search for chomp in File::Grep and found this example in the synopsis
fmap { chomp; lc; } hence there is no other way than doing the obvious my @line = map { chomp } fgrep { /^[2-6] .+$/ } *DATA; This should do too my @line = grep { /^[2-6] .+$/ } fmap {chomp} *DATA; HTH
Cheers Rolf
updateThe usual trick to include the grep condition into map is left as exercise. ;)
In reply to Re: Can figure out a way to get File::Grep's fgrep to chomp matches
by LanX
|
|