note
hippo
<p>Objects in Perl are references anyway, specifically blessed references. Therefore when you pass an object to a subroutine you are necessarily passing by reference. For example, in the following snippet <c>$obj</c> is passed by reference and may be altered by <c>munge_it()</c></p>
<code>
my $obj = Some::Class->new ();
munge_it ($obj, $data);
</code>
<p>No copying of objects should have occurred here.</p>
<p>If you want to know why your script is slow, profile it. Much better than guessing and spending time "optimising" some part of the script which doesn't require it.</p>
<p>Good luck.</p>
1059903
1059903