Re: perl: problem with s/// and variable interpolation

1998-05-04 Thread Yann Dirson
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; >

Re: perl: problem with s/// and variable interpolation

1998-05-04 Thread Darren/Torin/Who Ever...
-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

Re: perl: problem with s/// and variable interpolation

1998-05-02 Thread Yann Dirson
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.

Re: perl: problem with s/// and variable interpolation

1998-05-01 Thread Joost Kooij
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