Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Can not print hash element

by dreadpiratepeter (Priest)
on Sep 23, 2008 at 01:49 UTC ( [id://713127]=note: print w/replies, xml ) Need Help??


in reply to Can not print hash element

You have not taken the spaces in your input into account. try:
split /\s*,\s*/;
that should fix it.
You were generating a key of " USA", not "USA".


-pete
"Worry is like a rocking chair. It gives you something to do, but it doesn't get you anywhere."

Replies are listed 'Best First'.
Re^2: Can not print hash element
by lightoverhead (Pilgrim) on Sep 23, 2008 at 02:05 UTC
    Thank you very much. You have sharp eyes. It's fixed.
      Another opportunity to promote Data::Dumper =)
      use Data::Dumper; local $Data::Dumper::Useqq = 1; # print non-printable chars print Dumper \%table;

      So, whenever perl seems to be wrong, first debug yourself what data you have.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-24 10:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found