in reply to Re: Re: Re: search, replace and backrefrences
in thread search, replace and backrefrences

I was about to say murky, but unimportant but bit my tongue
as everything is important to someone.

It seems unclear what behavior is intended, i.e. murky.
Why shouldn't I be able to my $99;?   I haven't seen anything to
suggest it is illegal. Or why is $123456 read-only?

Is this documented somewhere? Point me at it.

I'm pretty sure I got that from the Camel book.

Replies are listed 'Best First'.
Re: numerically named vars
by demerphq (Chancellor) on Sep 30, 2002 at 20:32 UTC
    Its partly documented in perlvar but mostly in the camel. Basically all the digit scalars are used for doing pattern match storage. Apparently one of the other scripting langugae had a limit (i think 9) on the number of capture buffers allowed. I believe it was a matter of pride that perl could handle an unbounded number (ykwim). And as all of the capture buffers are read-only that makes them all read only. The lexical bit I dont remember. :-)

    --- demerphq
    my friends call me, usually because I'm late....

Re: numerically named vars
by Shendal (Hermit) on Sep 30, 2002 at 20:28 UTC
    From perldoc perlvar:
    Contains the subpattern from the corresponding set of parentheses in the last pattern matched, not counting patterns matched in nested blocks that have been exited already. (Mnemonic: like \digits.) These variables are all read-only.