![]() |
|
Perl Monk, Perl Meditation | |
PerlMonks |
Re^2: Getting Value from joining 2 variablesby moritz (Cardinal) |
on Jan 02, 2011 at 13:30 UTC ( #880072=note: print w/replies, xml ) | Need Help?? |
"$pax_$plus" simply creates a string. If $pax is "foo", and $plus is "100", then "$pax_$plus" creates the string "foo_100" Not at all. It tries to look up the variable $pax_ (since an underscore is valid part of a variable name), and fails (and thus interpolates the empty string for $pax_). use strict; use warnings; would have caught the problem, and can only be highly recommended to Noverast.
In Section
Seekers of Perl Wisdom
|
|