[Israel.pm] (no subject)

Gabor Szabo szabgab at gmail.com
Thu Mar 16 07:17:10 PST 2006

On 3/16/06, Levenglick Dov-RM07994 <Dov at freescale.com> wrote:
> Actually it is because that is what it is supposed to do. What I had really wanted to ask is why this:
> perl5.8.7 -e '$a="";$a=~s/(\w+)\.(\w+)\.(\w+)\.(\w+)\.(\w+)\.(\w+)\.(\w+)\.(\w+)\.(\w+)\.(\w+)/\10/;print $a'
> doesn't print anything when the camel book states:

still you have to use $10 in the replacement part.
\10 refers to the buffer only in the regex part.

perl5.8.7 -e '$a="";$a=~s/(\w+)\.(\w+)\.(\w+)\.(\w+)\.(\w+)\.(\w+)\.(\w+)\.(\w+)\.(\w+)\.(\w+)/$10/;print

prints 20


More information about the Perl mailing list