Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Question related to the use of constants

by haoess (Curate)
on Aug 20, 2004 at 17:44 UTC ( #384658=note: print w/ replies, xml ) Need Help??


in reply to Question related to the use of constants

Isn't that supposed to print "test1" in the second print ?

No. If you create a hash key using a bareword, it will be treated as if it was a quoted string. Use $hash{ &KEY } = $value to get your constants work.

-- Frank


Comment on Re: Question related to the use of constants
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (10)
As of 2015-07-06 15:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (77 votes), past polls