----- Original Message -----
From: Ramprasad A Padmanabhan <[EMAIL PROTECTED]>
Date: Friday, March 11, 2005 2:09 am
Subject: Best way to check if element exists
> Hi All,
Hello,
> Maybe this is OT , I am sorry for that.
>
> I have a specific email application , where I want to check if a
> particular id exists or not in a file.
> Since this happens at real time I want the application to be
> as fast
> as possible.
> I am currently using DB_File hash, but that seems to be
> unnecessarybecause DB_File hashes are for checking key value
> pairs, but my
> requirement is just to find if a key exists.
>
> Also note that my Hash list will be a really long list,but relatively
> static ( No frequent additions/deletions expected )
print "exists" if $hash{key};
>
>
> Thanks
> Ram
>
>
>
> ----------------------------------------------------------
> Netcore Solutions Pvt. Ltd.
> Website: http://www.netcore.co.in
> Spamtraps: http://cleanmail.netcore.co.in/directory.html
> ----------------------------------------------------------
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
>
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>