|
|
| Don't ask to ask, just ask | |
| PerlMonks |
Re: using strict and functionsby mirod (Canon) |
| on Jan 17, 2002 at 22:40 UTC ( #139586=note: print w/ replies, xml ) | Need Help?? |
|
You can also declare a global hash (or array, but a hash is more convenient) containing the variables and pass it around as a parameter to the functions:
This way you group the variables together cleanly and you can pass them to the functions without clobbering your parameter lists. Of course if you want to get OO brownie-points you can also make $state an full-blown object, but that would be an other
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||