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

Re: Wrong hash output

by virtualsue (Vicar)
on Jul 17, 2005 at 19:40 UTC ( #475583=note: print w/ replies, xml ) Need Help??


in reply to Wrong hash output

After you have populated this hash, try displaying its contents via Data::Dumper. Perhaps you are inadvertently creating more hash keys than you intended. That's extremely easy to do.


Comment on Re: Wrong hash output
Re^2: Wrong hash output
by tphyahoo (Vicar) on Jul 17, 2005 at 21:19 UTC
    Agree, and just wanted to say, when you're dumping, dump a reference to the hash and your output will be better. (Don't dump the hash itself)
    use strict; use warnings; use Data::Dumper my %hash = (a=>1) print "hash: " . Dumper( {%hash} ); # not Dumper(%hash)
    good luck!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (11)
As of 2015-07-07 12:07 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 (88 votes), past polls