Aug 19, 2008, 1:41 AM
Post #1 of 3
I want to concatenate two strings, one held in a variable, and the other a literal string to form one word, and then rename a variable as that word.
How to concatenate strings to rename var
$type = 'perl';
$oldvar = 10;
$oldvar = $type + '_context';
which would print the value 10. I have been told that this is possible but I cannot find how to do it.
NB. This code does not work.
If there are three possible problems, and you circumvent these, a fourth and previously unseen problem will promptly develop!