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