Keep It Simple, Stupid | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
The following also works, though is equally surprising that it is needed.
This works because variables declared at one scope are accessible from scopes inside the declaring scope. Unfortunately, there isn't a good way to change this. It can, and probably should be, documented in the page for use and, maybe, also in the page for the lib pragma. (Maybe a warning could be added when parsing use to remind people that my inside use has no effect and suggest alternate syntax.) In reply to Re^2: Scope in use
by RonW
|
|