Help for this page

Select Code to Download


  1. or download this
    #!usr/bin/perl
    my $a = 1;
    %hash = map { $_ , undef } 0 .. 3;    
    ...
    
    __END__
    0 3 2 1
    
  2. or download this
    @h = sort {$a <=> $b} @arr = keys %hash; # doesn't sort
    @h = sort {$a <=> $b}        0 .. 3;     # do      sort
    @h = sort {$a <=> $b} @arr = 0 .. 3;     # do      sort