in reply to Re^6: Access a global variable from a subroutine when used as "for" iterator
in thread Access a global variable from a subroutine when used as "for" iterator
Your perception of my as global is also wrong !
Only special variables like $_, $a, $" are really global (they always belong to the main:: namespace).
It is clear that I don't know how to call a variable that could be accessed from everywhere within the script's (main?) scope. I'm not sure if "public" is a better name. There is no intention to share it with modules in order to use "our", at least at this stage of the development.
(maybe I should start writing a tutorial instead of preaching again and again ;)
That could be very useful for people like me, if that tutorial is well indexed by search engines (or the Super Search). :-D
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Access a global variable from a subroutine when used as "for" iterator (updated)
by LanX (Saint) on Dec 22, 2023 at 02:24 UTC | |
by hippo (Archbishop) on Dec 22, 2023 at 08:45 UTC | |
by LanX (Saint) on Dec 22, 2023 at 10:14 UTC |