I have a hash and the keys are page names.
(snip)
I want to create another hash using the page names as the keys and the count() result as the values.
my %orig= # ... my %new; $new{$_}=however_you_get_it_from($_) for keys %orig;
or
my %new=map { $_ => however_you_get_it_from($_) } keys %orig;
or...
In reply to Re: Hashing up hashes
by blazar
in thread Hashing up hashes
by pickledegg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |