Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^3: Using Variable Value as Variable Name

by kennethk (Monsignor)
on Jun 28, 2012 at 14:41 UTC ( #978951=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Using Variable Value as Variable Name
in thread Using Variable Value as Variable Name

A hash is a much more natural way of dealing with this, and IMHO one of Perl's greatest strengths (the other being regular expressions). You could even use lock_keys from Hash::Util to protect yourself from typos.


#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.


Comment on Re^3: Using Variable Value as Variable Name
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (10)
As of 2014-12-26 15:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (171 votes), past polls