Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: printing a hash

by perliff (Monk)
on May 26, 2009 at 06:25 UTC ( [id://766134]=note: print w/replies, xml ) Need Help??


in reply to printing a hash

The error is because you are declaring the variable $verse and inside the foreach loop. This cannot be seen outside. So declare it where you declare %Scripts etc. Also there is an error in your print statement. Here is the correct statement.

print "$verse => $Scripts{$verse}\n";

You need these "{}" instead of "()".

perliff

----------------------

"with perl on my side"

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2024-04-19 12:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found