A refinement of ikegami's for when you want to skip items in @array which are not keys of %hash,
for (grep {exists $hash{$_}} @array) { print $_, " :\t", $hash{$_}, "\n"; }
After Compline,
Zaxo
In reply to Re: Printing items from an Hash using an Array
by Zaxo
in thread Printing items from an Hash using an Array
by Gavin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |