I rarely, if ever use global variables, they don't really provide many benefits over objects or local variables and can potentially lead to many bugs.
If I were you, I would stick all my data into a readonly data object. Then you can pass your subroutines the data object instead. This way you can make your data specifically 'READONLY', ie: no gotchas which your subroutines "accidently" change a value.
In reply to Re: Best practices with globals and subroutine arguments
by Herkum
in thread Best practices with globals and subroutine arguments
by Foxpond Hollow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |