map array to hash

2006-05-29 Thread John Ackley
there is more than one way to do it is there an easier way to do this map: my $index = 0; while( my @a = $SQL-fetchrow_array) { my %a = map { $fieldnames[$index++] = $_ } @a; print $_ = $a{$_}\n for (keys %a); } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: map array to hash

2006-05-29 Thread John Ackley
Jenda Krynicky wrote: From: John Ackley [EMAIL PROTECTED] there is more than one way to do it is there an easier way to do this map: my $index = 0; while( my @a = $SQL-fetchrow_array) { my %a = map { $fieldnames[$index++] = $_ } @a; print $_ = $a{$_}\n for (keys %a); }