P is for Practical | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
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. In reply to Re^3: Concatenation of scaler reference
by cdarke
|
|