in reply to Re: Local Subroutines
in thread Local Subroutines

Aren't you globbing a lexical here?

The PerlMonk tr/// Advocate

Replies are listed 'Best First'.
Re: Re: Re: Local Subroutines
by PodMaster (Abbot) on May 28, 2004 at 06:18 UTC
    Lexicals can't be globbed (whatever that means ;) because they're lexical, not global (they don't live in the symbol table):
    my $foo = sub {'i am $foo '}; *foo = sub{'i am *foo '}; print $foo->(), $foo,$/; print foo(), \&foo,$/; __END__ i am $foo CODE(0x1ab2860) i am *foo CODE(0x1ab28e4)

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.