in reply to Perl Hash

thanks Dave, I've got past the "not declaring my $k further up the program" problem now :)

but it appears my problem is what "not Keith" says

>> You also seem to think that you can have multiple values for a single key. That's not true,

well in that case, I do have a problem as I want to store several lines of text against the same key like this



KEY1 07/25/05 09:04:36 KEY2 07/25/05 09:04:36 KEY2 07/25/05 09:04:37 KEY2 07/25/05 09:05:49 KEY2 07/25/05 09:05:50 KEY3 07/25/05 09:05:50


so then I can find the earliest time in KEY2 is 09:04:36 and the latest time is 09:05:50

However, now I'll have to find another way.

Thanks for your help.





p.s. I seem to have got the reply depth too deep !

Replies are listed 'Best First'.
Re^2: Perl Hash
by kutsu (Priest) on Jul 26, 2005 at 14:30 UTC

    You also seem to think that you can have multiple values for a single key. That's not true.

    You can with LoLs (list of lists): perldsc and esp. pay attention to hashs of arrays and hash of hash.

    Update:Seems I replied to the dup

    "Cogito cogito ergo cogito sum - I think that I think, therefore I think that I am." Ambrose Bierce