http://qs321.pair.com?node_id=589701


in reply to Re: Being impervious to an 'each' reset
in thread Being impervious to an 'each' reset

You could avoid copying the large hash by using a reference:
my $thingy_ref = \%Foo::Bar::Baz::thingy; foreach my $key ( keys %$thingy_ref ){ print "$key => $thingy_ref->{ $key }\n"; }

Replies are listed 'Best First'.
Re^3: Being impervious to an 'each' reset
by Fletch (Bishop) on Dec 14, 2006 at 00:27 UTC

    Erm, then you'd have a reference to the same hash you're trying to avoid resetting the each iterator and the OP would be back to square one. The iterator is a property of the underlying hash, not how it's accessed.