You can check if a key is already in a hash table with Perl's exists()
function.
Have a look at 'perldoc -f exists' for details.
Hope this helps.
-- Marcus
----- Original Message -----
From: "Darfler, Jim (J.E.)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 21, 2001 8:05 PM
Subject: comparing hash values
> I am trying to populate a hash with key/value pairs, basically the file
name and its dates. I am extracting part of the file name to use as the key.
Some of the keys will be the same. I want to put a new value in only if its
newer than the value currently stored.
>
> My problem is, how do I know there is a value based on the key? If there
is already one there, the comparison is easy, but what do I get as the value
if the key/value has not been used? Is there a way to know if the value has
not been assigned?
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]