Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

numerically named vars

by rir (Vicar)
on Sep 30, 2002 at 20:23 UTC ( #201830=note: print w/replies, xml ) Need Help??


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:
    $<digits>
    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.

    Cheers,
    Shendal

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://201830]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2021-12-03 12:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    R or B?



    Results (29 votes). Check out past polls.

    Notices?