Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Dump using Dumper

by jdporter (Paladin)
on Mar 23, 2004 at 05:36 UTC ( [id://338904]=note: print w/replies, xml ) Need Help??


in reply to Dump using Dumper

No, that's not what Dumper is for. The output of Dumper is specifically designed to be eval-uable as perl code.

But it's easy to get output like what you want. For example, you could write a function like the following:

sub dump_hash(\%) { my $hr = shift; for ( sort keys %$hr ) { print "$_ $hr->{$_}\n"; } } # use it like so: my %hash = ( ...whatever... ); dump_hash(%hash);

jdporter
The 6th Rule of Perl Club is -- There is no Rule #6.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2024-04-24 23:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found