on Tue, 30 Jul 2002 16:45:26 GMT, [EMAIL PROTECTED] (Tómas
guðmundsson) wrote: 

>> But what do I do to make it more than just the phone number so if
>> I ask of Fred it shows his number, address, e-mail, and such ?
>>
>> my %phone_book = qw(
>>     Fred [EMAIL PROTECTED] 0123 fred'sstreet 34
>>  );
>> I know perl always search for the key and then returns the value
>> but how do I make the value more than one word?

Use a hash of hashes:

    my %phonebook = (
        Fred => { EMAIL   => '[EMAIL PROTECTED]',
                  NUMBER  => '0123',
                  ADDRESS => 'fred\'sstreet 34', },
    );

which you can access with
  
    $phonebook{Fred}->{EMAIL} #etc

-- 
felix

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to