in reply to Re^7: Closures and undefined subs
in thread Closures and undefined subs
That's the original code still!! We have already told you how to fix it, and it does not give the errors you want us to look at.
However, I think I guessed what you are doing wrong: setting local *func or my $func after the point where it's used.
# BAD sub outer { my $var; ($t, @y) = rkXXX(\@y, $dydt, $t, $dt); my $dydt = sub { ... }; } # Good sub outer { my $var; my $dydt = sub { ... }; ($t, @y) = rkXXX(\@y, $dydt, $t, $dt); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: Closures and undefined subs
by KaiAllard_ (Initiate) on Sep 26, 2007 at 20:42 UTC | |
by ikegami (Patriarch) on Sep 26, 2007 at 21:09 UTC |