Executing perl variables

Alex Satrapa grail at goldweb.com.au
Wed Dec 26 09:46:18 EST 2001

On Wednesday, December 26, 2001, at 08:47 , Michael Still wrote:

> Hey all. I hope you had a good Christmas...

Waaaay too much white christmas.

> I have a desire to execute code embedded in perl variables.

Use "eval":

% perl
$y = 4;
$x = eval('$y++');
print "$x, $y\n";
4, 5


More information about the linux mailing list