Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Data::Dumper in reference to Hashes

by chargrill (Parson)
on Jan 27, 2007 at 22:12 UTC ( #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
Node Status?
node history
Node Type: note [id://596910]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2019-09-22 14:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The room is dark, and your next move is ...












    Results (273 votes). Check out past polls.

    Notices?