Help for this page

Select Code to Download


  1. or download this
    my %word = (
              'list' => 3,
    ...
              'at' => 1,
              'if' => 2,
    );
    
  2. or download this
    print "$_ => $word{$_}\n" for sort keys %word;
    
  3. or download this
    print "$_ => $word{$_}\n"
       for sort {$word{$a} <=> $word{$b}} keys %word;
    
  4. or download this
    print "$_ => $word{$_}\n"
       for sort {
    ...
          $a cmp $b                   # sort keys asc
       } keys %word
    ;
    
  5. or download this
    use strict;
    use warnings;
    ...
    if that's so it would have been nice if they said
    that in the docs because at first I thought it was
    a filehandle of some kind.