Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: user defined variable as hash key index

by naikonta (Curate)
on Oct 16, 2007 at 01:12 UTC ( #645087=note: print w/ replies, xml ) Need Help??

in reply to user defined variable as hash key index

Additionally from FunkyMonk's answer, you may also want to put some checking to see if supplied name doesn't exist in %numbers to avoid unitialized warning.

print "Who's number are you looking for? : \n"; chomp(my $who = <STDIN>); my $number = $numbers{$who} || 'unknown'; print "$who number is $number\n";

Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!

Comment on Re: user defined variable as hash key index
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2015-11-25 23:17 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 (693 votes), past polls