Help for this page

Select Code to Download


  1. or download this
    #!/usr/local/bin/perl
    use strict;
    ...
    push @{$hash{'aa'}},{'key4'=>4};  #add another key
    @array_keys = keys %hash;         #update the array
    print "@array_keys\n";
    
  2. or download this
    for (@array_keys){
            for my $element ($hash{$_}){
    ...
                    print "@val\n";
                    }
            }
    
  3. or download this
    use strict;
    use warnings;
    ...
            }
    
    print Dumper(\%hash_output);
    
  4. or download this