I see. eval is the tricky one. Thank you.
- - -
On Tue, 01 Oct 2002 13:53:59 +0200, Detlef Lindenthal wrote:

>Just be a bit more generous and grant your script one more backslash:

$a = 'ABCD'; $b = 'bcda'; $z = 'DCBA';
eval "\$z =~ tr/$a/$b/";
print $z, "\n"; #  prints:  adcb

## ... because    eval "$z"   is the constant 'DBCA'
##     rather than the variable $z !!!

Regards, Detlef

Reply via email to