in reply to Re^8: Closures and undefined subs
in thread Closures and undefined subs

I dont have all the code here but I am almost sure you are absolutely right...
Thats why it tolds me in any case undefined or empty reference...
I was not aware that I am changing semantic of "anywhere" sub to "define before use" variable with local!

Will try it out but I guess you solved my problem.

Replies are listed 'Best First'.
Re^10: Closures and undefined subs
by ikegami (Patriarch) on Sep 26, 2007 at 21:09 UTC

    I was not aware that I am changing semantic of "anywhere" sub to "define before use" variable with local!

    There's nothing magical about the = in local *func = sub { ... }; or my $func = sub { ... };. It's an assignment like any other. You can't fetch the value from a variable before you assign the value to the variable. Or as the case is here, before you even create the variable.