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

Re: Sort on boredom

by petral (Curate)
on Mar 23, 2001 at 22:46 UTC ( [id://66696] : note . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use Data::Dumper;
    ...
    
    print Data::Dumper->Dump([\@sorted], ['*sorted']);
    
  2. or download this
    perl -le '$,=", ";print sort { $#$b <=> $#$a or $a cmp $b}'\
            -e 'keys %{{ map {@$_ = (@$_, $_); $_=>1} @ARGV}};'\
     0 _ __ 0 __ __  0 0 00 @ % $ % ^ ^_
    
    
    result-> 0, __, %, $, 00, @, ^, ^_, _