Darren/Torin/Who Ever... writes:
> Two things:
> 1) If you want stuff on the right hand side to eval-ed (double
>substitute variables), you need to do it yourself.
>Note that with:
> $TRANSLATION = '\$1;\$2'; $str = "ab";
>both
> $str =~ s{(.)(.)}{$TRANSLATION}ee;
>
-BEGIN PGP SIGNED MESSAGE-
Yann Dirson, in an immanent manifestation of deity, wrote:
>I wrote a sample script whose behaviour seems strange to me. At least
>I can't find in the doc why it behaves so, nor what I should write to
>get the expected result.
Two things:
1) If you want stuff o
Joost Kooij writes:
> > #!/usr/bin/perl
> >
> > $TRANSLATION = '\1;$2';
> > $str = "ab";
> > $str =~ s{(.)(.)}{$TRANSLATION};
>
> [snip]
>
> Have you tried wrapping the substitution statement with an "eval"
> construct yet? I think that should make it work.
I had not, and it works.
On Thu, 30 Apr 1998, Yann Dirson wrote:
> I wrote a sample script whose behaviour seems strange to me. At least
> I can't find in the doc why it behaves so, nor what I should write to
> get the expected result.
>
> The sample script
> #!/usr/bin/perl
>
> $TRANSLATION = '\1;$2';
> $str = "a
4 matches
Mail list logo