[[ This message was both posted and mailed: see
   the "To," "Cc," and "Newsgroups" headers for details. ]]

In article <[EMAIL PROTECTED]>, Dan Jacobson
<[EMAIL PROTECTED]> wrote:

> >> perlop and perlretut seem not to mention that $1, $2 ... are reset
> >> even when one doesn't use ()'s.
> 
> b> The memory variables are always the values from the last successful
> b> match.  It doesn't matter what that match was.  See their entry in
> b> perlre.
> 
> b> Which parts of perlop and perlreftut do you think are confusing?

> All I know is that you should add an explicit warning somewhere(s),
> otherwise some users might think:

> "Who would have thought that the numbered variables would be
> tampered with again if I didn't use any ()'s".

People might think about all sorts of things, and we can't warn
about everything everywhere.  perlre says explicitly that they 
are from the last successful match.  It doesn't matter what that 
last match is or what its pattern was.  That seems pretty clear
to me.

-- 
brian d foy, [EMAIL PROTECTED]

Reply via email to