i get the info from query and i need to put it into a table/hash
and then i need to search on the table/hash if it already exits and if exists 
take the phone out.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Gabor Szabo
Sent: Thursday, June 28, 2007 3:53 PM
To: Perl in Israel
Subject: Re: [Israel.pm] HASH with 3 key items


On 6/28/07, Ernst, Yehuda <[EMAIL PROTECTED]> wrote:
> Hello!
>
> I want to manage a list with 3 key items
>
> i want ( adders , name , title  = > phone)
> i need to check my list and  only if the 3 matches i need to extract the 
> phone number
> can i do it with hash or i need something else?

I guess you have the information in some sort of file or database so
if you managed to extract the 4 pieces of information you can then write:

my %phonebook;
loop_over_file {
   $phonebook{$address}{$name}{$title} = $phone;
}



Gabor
-- 
Gabor Szabo
http://www.szabgab.com/
Perl Training in Israel  http://www.pti.co.il/
_______________________________________________
Perl mailing list
Perl@perl.org.il
http://perl.org.il/mailman/listinfo/perl
*************************************************************************************
This e-mail is confidential, the property of NDS Ltd and intended for the 
addressee only.  Any dissemination, copying or distribution of this message or 
any attachments by anyone other than the intended recipient is strictly 
prohibited.  If you have received this message in error, please immediately 
notify the [EMAIL PROTECTED] and destroy the original message.  Messages sent 
to and from NDS may be monitored.  NDS cannot guarantee any message delivery 
method is secure or error-free.  Information could be intercepted, corrupted, 
lost, destroyed, arrive late or incomplete, or contain viruses.  We do not 
accept responsibility for any errors or omissions in this message and/or 
attachment that arise as a result of transmission.  You should carry out your 
own virus checks before opening any attachment.  Any views or opinions 
presented are solely those of the author and do not necessarily represent those 
of NDS.

To protect the environment please do not print this e-mail unless necessary.
**************************************************************************************

_______________________________________________
Perl mailing list
Perl@perl.org.il
http://perl.org.il/mailman/listinfo/perl

Reply via email to