Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Can't localize lexical variable $var at...

by Abigail-II (Bishop)
on Jun 10, 2002 at 13:36 UTC ( #173119=note: print w/ replies, xml ) Need Help??


in reply to Re: Can't localize lexical variable $var at...
in thread Can't localize lexical variable $var at...

Mixing the 2 is (to mix a metaphor; sorry) mixing time and space; it just doesn't work.
Ah, if things were only that simple. I can make a lexical hash. The scope of its elements is limited by space. Yet I can localize such elements.

Note that perl-5.000 to perl-5.000o do allow you localize a lexical variable. perl-5.001 no longer allows that. The Changes file on 5.001 says:

NETaa13502: now complains if you use local on a lexical variable
From: Larry Wall
Files patched: op.c
 Now says something like

     Can't localize lexical variable $var at ./try line 6.

I cannot find a rationale though - perhaps the p5p archives have such a rationale, if they go back that far.

Abigail


Comment on Re: Can't localize lexical variable $var at...
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2015-07-04 07:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (58 votes), past polls