But think twice before sending the result to system()$perl -de1 DB<1> x $a 0 undef DB<2> x $str = ' \$a is $a and \$a*2 is ${\($a*2)} ' 0 ' \\$a is $a and \\$a*2 is ${\\($a*2)} ' DB<3> $a = 3 DB<4> x eval qq{"$str"} 0 ' $a is 3 and $a*2 is 6 ' DB<5> $a = 5 DB<6> x eval qq{"$str"} 0 ' $a is 5 and $a*2 is 10 '
In reply to Re: possible to evaluate scalars stored in a string?
by bsb
in thread possible to evaluate scalars stored in a string?
by emilford
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |