On Wed, Aug 22, 2001 at 02:53:44PM -0400, Yacketta, Ronald wrote:
> 
> 
> > $workingcopy =~ tr/$lettertochange/$lettertochangeto/g;
> > 
> shot in the dark, taken from my shell scripting days
> 
> try {} around your variables
> $workingcopy =~ tr/${lettertochange}/${lettertochangeto}/g;

shot in the light ;-)

The tables are built at compile time, so if you want to use variables
here you will need to use string eval.

eval "tr/$lettertochange/$lettertochangeto/";

I'm not sure what your /g at the end was doing, but tr doesn't need it.

Don't forget to check $@ to make sure all went well.

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to