Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Data::Dumper in reference to Hashes

by chargrill (Parson)
on Jan 27, 2007 at 22:12 UTC ( [id://596910]=note: print w/replies, xml ) Need Help??


in reply to Data::Dumper in reference to Hashes

I don't know, the first sentence in the Data::Dumper page seems pretty clear to me:

Data::Dumper - stringified perl data structures, suitable for both printing and eval

Stringified may not be a real word, but it means "turned into a string" (which according to the Oxford Dictionary, is "a linear sequence of characters, words, or other data").

Perl Data Structure is pretty straightforward - it's a structured hunk of data in perl.

Suitable for printing means you can print it.

Suitable for eval means you can copy and paste it as valid perl code.

Try a few things:

#!/usr/bin/perl use strict; use warnings; use Data::Dumper; my %hash = ( 'test' => 'one', 'next' => 'two' ); print Dumper \%hash; __OUTPUT__ $VAR1 = { 'next' => 'two', 'test' => 'one' };


--chargrill
s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; = qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2024-03-29 15:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found