in reply to Re^7: Hard syntax error or disambiguable parsing?
in thread Hard syntax error or disambiguable parsing?

So, pre-lexicals, the localisation was done by doing local *loopvar; under the covers.

Since *loopvar is localised, not $loopvar, does this mean that in

our @loopvar; foreach $loopvar (...) { ... }
I can not access the outer @loopvar, because it is masked then too?

-- 
Ronald Fischer <ynnor@mm.st>

Replies are listed 'Best First'.
Re^9: Hard syntax error or disambiguable parsing?
by BrowserUk (Patriarch) on Jan 30, 2009 at 09:19 UTC

    My knowledge of Perl doesn't go back to pre-lexical days, so I don't know for sure, but I doubt it. Maybe that should be local $loopvar;?

    As I thought I made clear, I'm just trying to interpret what I see in code and comments to piece together a possible scenario for how the current situation came about. Ie. It's all supposition and sourcecode forensics founded upon my inability to see any reasoning by which it would have been explicitely architected to operate this way.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
Re^9: Hard syntax error or disambiguable parsing?
by shmem (Chancellor) on Jan 30, 2009 at 14:21 UTC
    I can not access the outer @loopvar, because it is masked then too?

    Try it ;-) But no, the @loopvar isn't masked, only the SCALAR slot in the typeglob gets a new reference.