Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Sorting Data::Dumper Output

by Rich36 (Chaplain)
on Nov 26, 2001 at 20:11 UTC ( [id://127558]=note: print w/replies, xml ) Need Help??


in reply to Sorting Data::Dumper Output

Similar to Ovid's answer, but different syntax...
use Data::Dumper; %hash = ( x=> 'line 1', z=> [ 1, 2, 4], y=> { file=> 'test.txt', length=> 200, type => 'ASCII' }, a=> 'line 2' ); foreach(sort{ $a cmp $b } keys(%hash)) { print Dumper($hash{$_}); }

Rich36
There's more than one way to screw it up...

Log In?
Username:
Password:

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

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

    No recent polls found