in reply to Re^3: how to declare a local *subname=sub{}?
in thread how to declare a local *subname=sub{}?

Now I think I see one source of your frustration.

The call to "stuff" is within the scope of the "local *asub", which has a value assigned to "asub" that is also within the same scope as "sub stuff".

i.e. the "undef" value preserved outside of the scope of the "local" ends past "sub stuff".

That's why it is a curiosity. I couldn't see (and still don't) why adding the "local" statement (who's scope includes "sub stuff") should make a difference.

  • Comment on Re^4: how to declare a local *subname=sub{}?

Replies are listed 'Best First'.
Re^5: how to declare a local *subname=sub{}?
by LanX (Saint) on Oct 31, 2016 at 12:35 UTC
    > I couldn't see (and still don't) why adding the "local" statement (who's scope includes "sub stuff") should make a difference.

    Because you still haven't read any of the doc links provided.

    local is a totally different beast compared to my and our .

    > Now I think I see one source of your frustration.

    well "frustration" is exaggerated ... I'll just stop talking to you until you do your homework. :-)

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!