Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
            $somehash{$2} = $1;
        }
    }
    
  2. or download this
    /^            # Anchor to beginning of string
      (           # Capture to $1
    ...
        [a-zA-Z]+ #     One or more letters
      )           #
    $/x;          # Anchor to end of string
    
  3. or download this
    while (<FILE>) {
        chomp;
        my ($value, $key) = (split /\s/, $_)[0,3];
        $somehash{$key}   = $value;
    }