in reply to eval & variable names?
$a = $a * 2
Which you means you have to build that string and pass it to the parser (eval EXPR). That can be done using the string literal
"\$$v = \$$v * 2"
So you want
eval "\$$v = \$$v * 2; 1" or die $@;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: eval & variable names?
by Anonymous Monk on Jan 21, 2012 at 00:36 UTC |