Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: easiest way to print the content of a hash?

by saberworks (Curate)
on Jul 13, 2006 at 15:59 UTC ( [id://560992]=note: print w/replies, xml ) Need Help??


in reply to Re: easiest way to print the content of a hash?
in thread easiest way to print the content of a hash?

use Data::Dumper; my %hash = ( key1 => 'value1', key2 => 'value2' ); print Dumper(%hash); # okay, but not great print "or\n"; print Dumper(\%hash); # much better
And the output:
$VAR1 = 'key2'; $VAR2 = 'value2'; $VAR3 = 'key1'; $VAR4 = 'value1'; or $VAR1 = { 'key2' => 'value2', 'key1' => 'value1' };

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-03-28 16:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found