Fellow Monasterians,
I couldn't get this map to work until I added the arrow operator, which I though was just for class methods and deferencing. Can someone explain what is going on with the arrow in this context, when nothing is being dereferenced AFAIK. Thanks.
my @pages = ( {'level' => '1','id' => 4}, {'level' => '2','id' => 10} ); my @ids = map { $_->{'id'} } @pages; print Dumper (@id); __END__ $VAR1 = 4; $VAR2 = 10;
In reply to Not understanding the arrow operator by bradcathey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |