in reply to Re^2: array/hash - reference and dereference
in thread array/hash - reference and dereference
My idea is: When the script start, I don't have the hash values. So,I want to create "pointer" points to the hash. And "save" the specific hash value into an array. Later, when the hash values are fetched, I can just run:%ages = ('Martin' => 0, 'Sharon' => 0, 'Rikke' => 0); #this way? @insert = \%ages; #at this point, what is the correct way to save the hash into an array +? $insert[0] = $ages->{‘Sharon’}; $insert[1]=$ages->{'Martin’}; %ages = ('Martin' => 28, 'Sharon' => 35, 'Rikke' => 29); : : $sqlquery -> execute(@insert);
Please advise. Thanks.$sqlquery -> execute(@insert);
|
|---|