Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Perl Program w/ Hash

by kiruthika.bkite (Scribe)
on Apr 22, 2010 at 03:43 UTC ( #836178=note: print w/ replies, xml ) Need Help??


in reply to Perl Program w/ Hash

Hash maintains the data as key-value pairs.
The data which is left to the operator '=>' is known as key.
And the data which is right to the operator '=>' is known as value.

Using keys you can get the value of a particular key in a hash in the following way.
$hash{'key'}

And keys should be unique.

In your case 'username' is a key and 'phone number' is a value.
So using username you can get the phone number of the user.
So,$friend{'username'} will give the phone number.


Comment on Re: Perl Program w/ Hash

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://836178]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2015-07-06 03:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (69 votes), past polls