Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Concatenation of scaler reference

by cdarke (Prior)
on Dec 14, 2011 at 08:40 UTC ( #943494=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Concatenation of scaler reference
in thread Concatenation of scaler reference

Speaking for myself, I still don't see why you need to build the name of a scalar variable dynamically. It would be much easier and neater to use a hash to store the values, and build the hash key dynamically.

You can create variable names dynamically in Perl, but it is very rairly justified.

Off topic, but I notice that you are using eq for comparing numerics. eq is for string comparisons, better to use == instead.

BTW, your supplied code will not compile, you use strict (which is good) but many of your variables are not declared using my.


Comment on Re^3: Concatenation of scaler reference
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2014-08-31 08:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls