in reply to Many strings make one variable?
Two more cents worth:
Playing around with "manufactured" references like
is fine and useful for one-off scripts. It might even be acceptable in a standalone application, if you are careful about what $foo and $bar are.no strict 'refs'; $value = ${$foo . $bar}
However, it is almost certainly begging for disaster in a CGI script unless you carefully validate your input, and the code you spend doing that would probably end up being longer than the code necessary to do it a better way (with a hash, as suggested above, for one).
|
|---|