Marco Antonio Valenzuela Escárcega writes:
> On Mon, 2002-07-08 at 14:03, Kevin Pfeiffer wrote:
[...]
> > I tried a sort of nested expression similar to what you show
> >
> > $string =~ s|{(.*?)}|{$1 =~ tr/iw/JX/)}|xg;
> >
> > It's supposed to capture the text between curly brackets and then do a
> > transliteration (i-->J and w-->X)
[...]
> that's because you are substituting (.*?) for "$1 =~ tr/iw/JX/" as a
> string, if you want to evaluate it as code, you need to add an e
> modifier to s///, (and you can get rid of the x because you aren't using
> it anyway):
> $string =~ s|{(.*?)}|($t=$1) =~ tr/iw/JX/;"{$t}"}|eg;

There was an extra curly brace on the right, but once I removed that, it 
worked perfecto! Thanks for the help; this list is super.

-- 
Kevin Pfeiffer <[EMAIL PROTECTED]>


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

Reply via email to