Welcome to the Monastery | |
PerlMonks |
Re: Re: Perl Optimizationby Cybercosis (Monk) |
on Jun 01, 2001 at 20:29 UTC ( [id://84982]=note: print w/replies, xml ) | Need Help?? |
foreach my $obj (%{$href}) # This dereference ^ causes a deep copy to be made actually, this is more accurate: If you check the ref()-iness of $obj, you'll find that there isn't any at all. The appropriate value is copied into $obj on each run of the loop. I'm not at all sure what it is you're trying to solve with this, but if you need access to the key/value pair without the big, horrendous copy, maybe something like this: Hope you find this useful! ~Cybercosis nemo accipere quod non merere
In Section
Meditations
|
|