Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Sorting Data::Dumper Output

by blakem (Monsignor)
on Nov 26, 2001 at 23:59 UTC ( [id://127610]=note: print w/replies, xml ) Need Help??


in reply to Sorting Data::Dumper Output

Depending on what you are doing, you might be able to use Storable's Canonical Representation like this:
#!/usr/bin/perl use strict; use Storable; $Storable::canonical = 1; my %hash = ( x=> 'line 1', z=> [ 1, 2, 4], y=> { file=> 'test.txt', length=> 200, type => 'ASCII' }, a=> 'line 2' ); store \%hash, 'hashfile.txt';
While the stored file isn't human readable, it will always be the same given the contents of the hash.

-Blake

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-04-16 15:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found