On Jun 25, 2004, at 10:12 AM, Daniel Falkenberg wrote:

Hi Wiggins,
Thank you for your reply. I will go and use the Finance::Quote::ASX module.
For now though this problem is really bugging me and for my own sake I would
like to get it to work. I have declared all my variables and am using
warnings and strict. Unfortunarly I am still only able to print the last set
of keys and values of my hash of hash outside of the foreach loop.
Any other ideas?

Yes, stop replacing the entire hash each time through the loop with your assignment. You just want to set one key. Change:


%stock_hash = (
$downloaded_stocks[0] => {
"Trading Price" => "\$$downloaded_stocks[1]",
"Price Change" => "\$$downloaded_stocks[2]",
},
);

To:

$stock_hash{$downloaded_stocks[0]} = {
"Trading Price" => "\$$downloaded_stocks[1]",
"Price Change" => "\$$downloaded_stocks[2]",
};

Hope that helps.

James


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to