in reply to Re: Invoking a string reference to a anonymous subroutine
in thread Invoking a string reference to a anonymous subroutine

Hi Dave

> It seems like you're wanting a symbolic reference to refer to a lexical scalar (a my variable), which it can't directly.

indeed... from perlref

Only package variables (globals, even if localized) are visible to symbolic references. Lexical variables (declared with my()) aren’t in a symbol table, and thus are invisible to this mechanism.

It never occurred to me, thanks for pointing it out! =)

Cheers Rolf

( addicted to the Perl Programming Language)

  • Comment on Re^2: Invoking a string reference to a anonymous subroutine