Help for this page

Select Code to Download


  1. or download this
    my %final_hash;
    foreach my $data_pair ( @data_list)
    ...
    
    use Data::Dumper;
    print Dumper \%final_hash;
    
  2. or download this
    my %final_hash = 
      map { $_->{key} => $_->{value} } 
    ...
    #verify the output
    use Data::Dumper;
    print Dumper \%final_hash;
    
  3. or download this
    #!/usr/bin/perl -w
    
    ...
    
    is_deeply( \%final_hash_long,  $expected, "long version works" );
    is_deeply( \%final_hash_short, $expected, "short version works" );