At 04:48 PM 3/19/2004 -0500, you wrote:
stuart meacham wrote:
> If I have 2 arrays that I want to assign to the keys and values of a
> hash respectively, what would be easiest way to do that?
@[EMAIL PROTECTED] = @valuesarray
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
.
use strict;
use warnings;
my @keysarray = qw/a c b d f g t l w x v z/;
my @valuesarray = qw/1 2 3 4 5 6 7 8 9 10 11 12/;
my %hash = ();
@[EMAIL PROTECTED] = @valuesarray;
for (sort{$a cmp $b} keys %hash){
print "$_ => $hash{$_}\n";
}
On Fri, Mar 19, 2004 at 05:16:17PM -0600,