in reply to Need help with hashes please!!!

My first comment is this: I didn't read your previous post (the one you mention) for the same reason I almost skipped this one. You need to boil the code down to the offending sections or line and simplify your explainations.

But, I will tell you that the proper syntax for a foreach loop with a hash is: foreach $key (keys %hash)

if the hash is a reference then similiarily you do: foreach $key (keys %$hash)

I am not sure what you are trying to do here, because I just don't have the time to decipher all of it, but I think you are trying to do the latter. So, the line needs to be:

foreach $sedolelement (keys %$tradedatehash{$tradedatemarker}) {

With the hash symbol in front of the scalar representing the hash. Hope that helps. I know that Ovid has a piece on proper style for postings but I could not locate it. Maybe someone else can.


I admit it, I am Paco.