Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

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' };

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

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2020-09-28 14:50 GMT
Find Nodes?
    Voting Booth?
    If at first I donít succeed, I Ö

    Results (144 votes). Check out past polls.