Help for this page

Select Code to Download


  1. or download this
    $hash{'one'} = [ '1', 'two', 'three'];
    $hash{'two'} = [ '2', 'three', 'four'];
    $hash{'three'} = [ '3', 'four', 'five'];
    
  2. or download this
    $hash{'1'} = [ 'one', 'two', 'three'];
    $hash{'2'} = [ 'two', 'three', 'four'];
    $hash{'3'} = [ 'three', 'four', 'five'];
    
  3. or download this
    #!/usr/bin/perl -w
    
    ...
    my %new_hash = map { $_->[0] => [ getkey($_), $_->[1], $_->[2] ] };
    
    print Dumper \%new_hash;