in reply to Getting pair of values from an array
Your second example is on track: treat @_ as a hash.
When you use an array as a hash, it is automatically broken up into key, value pairs.sub newfoo { my %hash = @_; foreach (keys %hash) {print "$_: $hash{$_}\n";} }
http://www.nodewarrior.org/chris/
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re(2): Getting pair of values from an array
by dmmiller2k (Chaplain) on Dec 27, 2001 at 19:57 UTC |