Re: substitution: interpolate capture buffer into variable?

2012-12-26 Thread Charles DeRykus
On Wed, Dec 26, 2012 at 10:29 AM, Paul Johnson wrote: > On Wed, Dec 26, 2012 at 04:10:06PM +0100, gator...@yahoo.de wrote: >> Hi, >> >> I would like to store regular expressions and substitution strings in >> a hash variable. If a given string matches any of the stored patterns, >> the correspondi

Re: Please exempt the book Modern Perl from Web Commercials on http://perl-begin.org/

2012-12-26 Thread Shlomi Fish
Hi chromatic, happy holidays and I hope everything is going well for you. On Fri, 2 Nov 2012 23:11:24 +0200 Shlomi Fish wrote: > Hi chromatic, > > first of all, thanks for your work on the book Modern Perl , and for allowing > free use and distribution of it. > > Now, I have mirrored a copy

Re: substitution: interpolate capture buffer into variable?

2012-12-26 Thread gator_ml
On 2012-12-26 19:29, Paul Johnson wrote: > This is a situation where string eval is warranted: > > eval "\$s =~ s/\$rx/$r/"; ... thanks a lot! Now that I now how it works, I can't believe I couldn't find the problem! I had tried string eval too; the real trick that I didn't get right is that t

Re: substitution: interpolate capture buffer into variable?

2012-12-26 Thread Paul Johnson
On Wed, Dec 26, 2012 at 04:10:06PM +0100, gator...@yahoo.de wrote: > Hi, > > I would like to store regular expressions and substitution strings in > a hash variable. If a given string matches any of the stored patterns, > the corresponding substitution should be applied. What originally looked > t

Re: substitution: interpolate capture buffer into variable?

2012-12-26 Thread timothy adigun
Hi, Please, check my comments below: On Wed, Dec 26, 2012 at 4:10 PM, wrote: > Hi, > > I would like to store regular expressions and substitution strings in > a hash variable. If a given string matches any of the stored patterns, > the corresponding substitution should be applied. What original

substitution: interpolate capture buffer into variable?

2012-12-26 Thread gator_ml
Hi, I would like to store regular expressions and substitution strings in a hash variable. If a given string matches any of the stored patterns, the corresponding substitution should be applied. What originally looked trivial turned out to be quite a challenge, particularly if the substitution str