Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Correct keys in hashes

by Aristotle (Chancellor)
on Aug 25, 2004 at 20:30 UTC ( [id://385811]=note: print w/replies, xml ) Need Help??


in reply to Re: Correct keys in hashes
in thread Correct keys in hashes

That doesn't have anything to do with quoting keys. $foo{name} will always be interpreted as $foo{'name'}, and there's no way you can disambiguate that by using or not using quotes.

If that was supposed to call your name function, you should have written it with parens, as in $foo{name()}. In fact, you should get in the habit of never calling functions without parens. (And of using sub strictures.) That will disambiguate almost every case of possible confusion that crops up in Perl.

Makeshifts last the longest.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://385811]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2024-03-29 09:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found