Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: adding key/value pairs to a hash.

by cbro (Pilgrim)
on Jun 20, 2003 at 13:58 UTC ( #267583=note: print w/ replies, xml ) Need Help??

in reply to adding key/value pairs to a hash.

$key = 'd'; $value = 4; $hash{$key} = $value;

That's all you need to do.
Just wanted to say that hashes can be used for so many different things, internal (e.g. %ENV, %INC, %main) and external, in perl; you will want to master them. If you're not getting enough from the 'camel' book, try the Black Book and perldoc -q hash.

Comment on Re: adding key/value pairs to a hash.
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2015-11-26 01:13 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (695 votes), past polls