P is for Practical | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
The first two work. In the upper, an anoymous hash is constructed with map's output, in the lower, an anonymous array. In each case, Dumper just get's passed the reference and dereferences it. These two work but NOT for the same reason, because there's an extra layer of ref->hash->ref going on?
This one doesn't work, because the code is trying to dereference the anonymous hash as an array (@{ }). The next one is just like the upper one from the former code block.
perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'
In reply to Re^7: Syntax for casting map to a hash or an array
by shmem
|
|