Update: Fixed mundane detail.my %hash; $hash{$_} = some_output($_) for @array; # Print each in arbitrary order like so: print $hash{$_} for keys %hash; # Print in original sequence by reusing the array: print $hash{$_} for @array; sub some_output { local $_; # Insert mystery code here }
In reply to Re: array and hash
by djohnston
in thread array and hash
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |