Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
First, I have an empty hash. Then, an array saved the specific hash value. After that, the hash will contain its values. The array will contain the hash value “automatically”. Is it possible? Please advice and help. Thanks.%hash = (); # How to create a hash with keys only? As at this point I +don’t have its value. @insert = \%hash; $insert[0] = $ages->{‘Sharon’}; $insert[1]=$ages->{'Martin’}; %ages = ('Martin' => 28, 'Sharon' => 35, 'Rikke' => 29); : : $sqlquery -> execute(@insert);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: array/hash - reference and dereference
by kyle (Abbot) on Jan 09, 2009 at 03:51 UTC | |
by Anonymous Monk on Jan 09, 2009 at 05:15 UTC | |
|
Re: array/hash - reference and dereference
by fullermd (Vicar) on Jan 09, 2009 at 03:04 UTC | |
by Anonymous Monk on Jan 09, 2009 at 03:33 UTC | |
by fullermd (Vicar) on Jan 09, 2009 at 04:45 UTC | |
by Anonymous Monk on Jan 09, 2009 at 03:39 UTC | |
|
Re: array/hash - reference and dereference
by kyle (Abbot) on Jan 09, 2009 at 03:36 UTC |