Forum Moderators: coopster
$file = "file2"; ${$file}_er = "something"; OR $.$file."_er" = "something";
I want to create $file2_er using the variable $file
How would i go about doing this?
Try your first example and play around with it a bit until it works as you want.
$file = 'file2'; ${"{$file}_er"} = 'something'; print $file2_er;
${$file.'_er'} = "something";