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

Re: Sort a long list of hosts by domain

by Brovnik (Hermit)
on Jun 24, 2001 at 00:18 UTC ( [id://91002]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @sorted =
       map  { $_->[1] }
       sort { $a->[0] cmp $b->[0] }
       map  { [join('.',reverse split(/\./)),$_] } @unsorted;
    
  2. or download this
    my $noodle = join($/,
       map  { sprintf("%64s",$_->[1]) }
       sort { $a->[0] cmp $b->[0] }
       map  { [join('.',reverse split(/\./)),$_] } keys %hash
       );
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-25 20:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found