Just another Perl shrine | |
PerlMonks |
Re: map {} list or do {} for list?by LanX (Saint) |
on Apr 11, 2014 at 14:29 UTC ( [id://1081974]=note: print w/replies, xml ) | Need Help?? |
TIMTOWTDI, both are fine. IIRC old versions of Perl had limitations with map in void context, but that's history. Some might argue that this is more readable
Cheers Rolf ( addicted to the Perl Programming Language)
updateinverted unless to if
updatethis works
but I'm not sure about side effects!
editaha -> each
If you add or delete elements of a hash while
you’re iterating over it, you may get entries skipped or
duplicated, so don’t. Exception: It is always safe to delete
the item most recently returned by "each()", which means that
the following code will work:
In Section
Seekers of Perl Wisdom
|
|