in reply to Not understanding the arrow operator
explain what is going on with the arrow in this context, when nothing is being dereferencedAs already explained above, you are in fact dereferencing $_ which in the context of your map is a reference to a hash.
the arrow operator, which I though was just for class methods and deferencingHere's a summary to avoid total confusion:
There are 3 cases where the array dereferences:
- $arrayref->[0];
- $hashref->{"key"};
- $coderef->("argument");
Then there are two cases for method calls:
- $object->method; # passes $object as first argument
- SomePackage->method; # passes "SomePackage" as first argument
hth
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Not understanding the arrow operator
by JavaFan (Canon) on May 18, 2009 at 21:04 UTC | |
by morgon (Priest) on May 18, 2009 at 21:20 UTC |