- 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";
- or download this
for (@array_keys){
for my $element ($hash{$_}){
...
print "@val\n";
}
}
- or download this
use strict;
use warnings;
...
}
print Dumper(\%hash_output);
- or download this