So "identifierValue()" is an attribute accessor for your object. Using $_->{identifierValue} is a kludgy hack, which I proposed in the absence of more information about the object's interface. Now that we know that $_->identifierValue works, where $_->_identifierValue didn't, you can do away with my fragile hack.
print $_->identifierValue(), "\n";
...should work just fine. The reason that we don't want to use $_->{identifierValue} if we can help it is because it's probably not part of the public interface for the object. The author of the class could change its internal implementation and break your code, because you're mucking with the object's internals. I assume that identifierValue() is part of its public interface, and is less likely to change without warning.
Dave
In reply to Re^3: dereferencing ... again
by davido
in thread dereferencing ... again
by natxo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |