develooper Front page | perl.beginners | Postings from April 2010

When to use anonymous references

Thread Next
Tim Bowden
April 26, 2010 07:16
When to use anonymous references
Message ID:
I've just realised I almost never use named arrays or hashes anymore.
It's almost always anonymous references instead.  That lead me to wonder
what criteria experienced perl hackers have as to when to use a named
array or hash, and when to start with an anonymous ref instead.  My very
informal criteria tends to be to use an anonymous ref from the start if
I'm going to be passing it to a sub, and a named array or hash
otherwise.  I've found the former to be much more common.  Thoughts?

Tim Bowden

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About