Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re (tilly) 1: O, the horrors of references and complex data structures

by tilly (Archbishop)
on Feb 06, 2001 at 01:44 UTC ( [id://56513]=note: print w/replies, xml ) Need Help??


in reply to O, the horrors of references and complex data structures

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
local *globHash;
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://56513]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-03-29 07:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found