On Wed, Aug 22, 2001 at 12:21:29PM -0700, Dan Grossman wrote:
> > eval "tr/$lettertochange/$lettertochangeto/";
>
> Does this mean that I have to use $_ for such a translation, or is
> there a way to modify a string inside an eval?
Here's a complete example:
#!/usr/local/bin/perl -w
use stric
> 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/";
Does this mean that I have to use $_ for such a translation, or is
there a way to modify a string inside a
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 t
Yacketta, Ronald" <[EMAIL PROTECTED]>
To: "SAWMaster" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, August 22, 2001 11:53 AM
Subject: RE: Simple one liner problem.
>
>
> > $workingcopy =~ tr/$lettertochange/$lettertochangeto/g;
> >
&
> $workingcopy =~ tr/$lettertochange/$lettertochangeto/g;
>
shot in the dark, taken from my shell scripting days
try {} around your variables
$workingcopy =~ tr/${lettertochange}/${lettertochangeto}/g;
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTE