- or download this
my %states_with_comments =
map { ((split /=/, $$_[0], 2)[1], 'hurray!') }
...
values %$db;
print "states are: ", (join "; ", sort, keys %states_with_comments), "
+\n";
- or download this
root@orion:/tmp# ./mytest.pl
states are: West Virginia; Washington
- or download this
my %states_with_comments = # and finnaly
+ we will take keys from hash
...
map { values %$_ } # take arrays that are below PR, A
+K, WA, WV
values %$db; # make list of hashes below numbers
+99155, 26134
- or download this
my %states_with_comments =
grep { warn Dumper({"finally" => $_}); 1; }
...
map { values %$_ }
grep { warn Dumper({"first step is" => $_}); 1; }
values %$db;
- or download this
root@orion:/tmp# ./mytest.pl
$VAR1 = {
...
'finally' => 'hurray!'
};
states are: West Virginia; Washington