$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 $@;
In reply to Re: eval & variable names?
by ikegami
in thread eval & variable names?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |