Do you know where your variables are? | |
PerlMonks |
Re (tilly) 1: O, the horrors of references and complex data structuresby tilly (Archbishop) |
on Feb 06, 2001 at 01:44 UTC ( [id://56513]=note: print w/replies, xml ) | Need Help?? |
Others have already told you the clean way to do this
(using anonymous hashes), but when you enter the first
function you can first do
and leave all else the same. This replaces the global typeglob with a new temporary replacement, your sub runs, pushes the ref the array, and then returns, replacing the original global. You then run again and get a new typeglob, etc. Not the best way, but it works.
In Section
Seekers of Perl Wisdom
|
|