Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    ...
    my %tmp = ( a=>1, b=>2, c=>3 );
    my @vals = @tmp{reverse sort keys %tmp};
    print "@vals\n";
    
  2. or download this
    Roboticus@Roboticus-PC ~
    $ perl t.pl
    3 2 1
    
  3. or download this
    my @vals = @tmp{reverse sort keys %tmp};