Help for this page

Select Code to Download


  1. or download this
    %hash = map {$_ => 1} <DATA>;
    print for (sort keys %hash);
    ...
    B=world
    B=planet
    C=universe
    
  2. or download this
    A=hello
    B=planet
    B=world
    C=universe
    
  3. or download this
    A=hello
    B=planet
    C=universe
    
  4. or download this
    use strict;
    my %hash = map {/^(.*)=/ or die "Malformed input: $_"; $1 => $_} <DATA
    +>;
    ...
    B=world
    B=planet
    C=universe