mnlight has asked for the wisdom of the Perl Monks concerning the following question:
this is the error I recievee.g. select value[0], value[1], value[1]} from table. I want value[0] to be the key that refers to value[1] or value[2] Here is what I tried while ($values = fetchrow_array()){ my $hash = ($value[0] => $value[1]); push (@{$hash{$values[0]}}, values[2]) } foreach $value (keys %has){ print "$hash: @($hash{$value}\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: 2 elements referenced by one Key
by dragonchild (Archbishop) on Feb 21, 2005 at 16:29 UTC | |
|
Re: 2 elements referenced by one Key
by Fendaria (Beadle) on Feb 21, 2005 at 16:56 UTC | |
|
Re: 2 elements referenced by one Key
by Tanktalus (Canon) on Feb 21, 2005 at 16:33 UTC | |
|
Re: 2 elements referenced by one Key
by jdalbec (Deacon) on Feb 21, 2005 at 16:43 UTC |