in reply to
m// vs grep for counting occurances of a string
incidentally, if you replace
grep
with
map
, you get the behavior you were expecting (a count of 4).
Comment on
Re: m// vs grep for counting occurances of a string
Select
or
Download
Code
In Section
Seekers of Perl Wisdom