in reply to array and hash
Boy, did you pick the right language. Try:
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 Section
Seekers of Perl Wisdom