In PHP, I can write:
$vname = \'phone\';
$$vname = \'555-1234\';
print $phone;
... And the script will output \"555-1234\".
Is ther
Read Mark-Jason Dominus's rants against doing this in Why it's stupid to `use a variable as a variable name'.
You would limit the scope of your changes to $phone by starting the block with
local $phone;
or even
local $$vname;
(Though either changes $phone for any subs called from your block too, so it's not the same as the lexical scope of a my()
declaration.)