This would be much harder in something that wasn't perl.my %hash; for my $element (@array) { $hash{$element} = <some command>; } ... for $element (@array) { # Keep the same order as the original array print "For $element, output was $hash{$element}\n"; }
-- Kirby, WhitePages.com
In reply to Re: array and hash
by kirbyk
in thread array and hash
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |