![]() |
|
Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Derive a variable name from a variable?by Laurent_R (Canon) |
on Dec 17, 2015 at 07:18 UTC ( #1150590=note: print w/replies, xml ) | Need Help?? |
Don't write Perl code that computes variable names. It can be done (it is called symbolic references), but it is bad practice, it is frowned upon for several good reasons, and it is bad enough that it will trigger a warning.
Use a hash instead. Update: Just as you can shoot a bullet into your own foot or put your cat into the microwave oven, but you should not do it.
In Section
Seekers of Perl Wisdom
|
|