Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: hash problems

by BioLion (Curate)
on Sep 20, 2010 at 16:41 UTC ( #860877=note: print w/ replies, xml ) Need Help??


in reply to hash problems

All it is is that your line: print("$passwords{"Matt"} is my password.");
is being interpreted as :

print("$passwords{"Matt"} is my password."); ^-- string -^ ^- another string-^
Effectively making 'Matt' a bareword (i.e. not a function, string etc...)

Always remember to use warnings and strict (and diagnostics for more info on any error messages).

Check out perldata for info on string interpolation... Hope this helps,

Just a something something...


Comment on Re: hash problems
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2015-07-06 03:50 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 (70 votes), past polls