perlquestion
kiat
Hi monks,<p>
I would like to seek your views on the merits/demerits of<p>
(1) declaring a shared variable as global versus<p>
(2) passing a localised variable from one subroutine to the next one that requires its value.<p>
With (1), the variable is declared at the top level. Somewhere in the code, it gets assigned a value and that value is used by other subroutines.<p>
With option (2), a localised variable is declared from within a subroutine. This variable is passed from this subroutine to the next one and to the ones after that which use that value.<p>
I look forward to reading your views :)<p>
Thanks in anticipation.