in reply to Re: Re: Re: Re: Re: Optimizing existing Perl code (in practise)
in thread Optimizing existing Perl code (in practise)
Nope. That would actually make things more complicated, since now you have to remember that this subroutine affects that global. It tends to make things more fragile, and much harder to follow for maintainers.
The global has no benefits whatsoever over passing data in by reference. You can modify data via a reference just as well as you can with a global...
--
Mike
|
|---|