Don't ask to ask, just ask | |
PerlMonks |
Re^3: [OT]: what difference between eval and do ?by dsheroh (Monsignor) |
on Apr 20, 2018 at 08:21 UTC ( [id://1213227]=note: print w/replies, xml ) | Need Help?? |
This is another instance of a mystery of which I've only recently become aware: The (mis(mis))use of grep in place of the (mis)use of map in place of a for-loop.Definitely agreed that it's a strange (mis|ab)?use of grep, but the map variant seems pretty canonical to me - it transforms the elements of a list and stores the resulting new list. The only thing that strikes me as questionable about it is that it overwrites the original list with the new one.
In Section
Seekers of Perl Wisdom
|
|