Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Dump using Dumper

by jdporter (Chancellor)
on Mar 23, 2004 at 05:36 UTC ( #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? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2022-01-19 18:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (55 votes). Check out past polls.

    Notices?