Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: O, the horrors of references and complex data structures

by CiceroLove (Monk)
on Feb 06, 2001 at 07:04 UTC ( [id://56592]=note: print w/replies, xml ) Need Help??


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

I know I am new at all of this but couldn't you just undef(globHash); before you start your next iteration? CiceroLove

Replies are listed 'Best First'.
Re: Re: O, the horrors of references and complex data structures
by goldclaw (Scribe) on Feb 06, 2001 at 13:28 UTC
    Nop, that undef's the hash, so the reference he keep in AoH points to a now undef'ed hash. He somehow need to disasociate the %globalHash name with the actual hash. Basically two ways of doing that if he wants to keep %globalHash truly global; using local or messing around with glob's

    sunw287 ~ > perl -e '%globalHash=(one=>"two"); $ref=\%globalHash; unde +f(%globalHash); print join("\n",keys %{$ref})' sunw287 ~ >

    goldclaw

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-25 23:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found