Don't ask to ask, just ask | |
PerlMonks |
Re^2: Help me decipher code containing map functionby shmem (Chancellor) |
on Jun 11, 2017 at 12:17 UTC ( [id://1192525]=note: print w/replies, xml ) | Need Help?? |
Nice example for map in void context. I wouldn't transform that into a full foreach loop, but use a statement modifier instead
for the same reasons I wrote down elsewhere. But then - regarding map in void context - all perl statements are executed for their side effect, and the computed value is discarded:
perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'
In Section
Seekers of Perl Wisdom
|
|