[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Callbacks not reliable?



On Thu, Sep 14, 2000 at 03:31:49PM -0600, Keary Suska wrote:
> I had always thought in m// or s/// that if the pattern doesn't match that
> the callback variables (i.e. $1, $2, $3 ...) would be undefined. I am
> finding that this isn't the case at least with a substitution.

That is incorrect.  $<digit> and the other regex special variables contain
the values from the last *successful* pattern match in the current scope.
An unsuccesful match does not reset these variables.

Ronald

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org