There's more than one way to do things | |
PerlMonks |
Re^2: global regex returning a list of arrays?by LanX (Saint) |
on Feb 20, 2010 at 22:25 UTC ( [id://824439]=note: print w/replies, xml ) | Need Help?? |
Ok if we include MoreUtils we could use part which does what I wanted without an explicit while:
but after considering MoreUtils it's only a small step to define a specialized functional solution fold (&) on one's own... grep { } fold { $a =~/(\w) (\w)/g }.
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|