I'm seconding Ime's suggestion, and adding one piece, you don't have
to use anonymous subroutines for everything..., that would be.., well,
a big pain.  Named subroutines where EVERYTHING it uses is passed in
via references.  Also it's return values are sent back via reference
as well.  References "under the covers" are pointers.  So if you were
to pass something to a perl function via a reference, like a hash, the
hash when it got back to it's calling context would be modified...,
this is pretty usefull.

(perldoc perlsub && perldoc perlref BTW)

The last thing is maybe you should look into isolating a lot of this
stuff into modules.  I'm sure your sub's are shared quite frequently
between many scripts..., well, there is no need to suck up all that
extra memory, just pull that into your own module set.

Thanks,
Shane.

The rule is... NO GLOBALS! :-)  Of course, every rule is made to
broken in certain situations.


Reply via email to