Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: Re: Re: search, replace and backrefrences

by demerphq (Chancellor)
on Sep 30, 2002 at 19:27 UTC ( #201808=note: print w/replies, xml ) Need Help??

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

Variable names that start with a digit may only have more digits in the name.

Cool. I didnt know that. What perldoc is it in?

This seems a murky area. my $99; throws an error.

Well, i agree its weird, but its not that murky. All of the ^\d+$ variables are global only and cannot be my()ed (and all of the scalars are read only).

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

  • Comment on Re: Re: Re: search, replace and backrefrences

Replies are listed 'Best First'.
numerically named vars
by rir (Vicar) on Sep 30, 2002 at 20:23 UTC
    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.

      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....

      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.


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2022-01-19 21:00 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (56 votes). Check out past polls.