note
DrWhy
I usually avoid <code>shift</code> unless I specifically need that array reduction behavior. In the context of parameter processing this is usually in OO-land when one method needs to call another with the same arguments it was given, e.g.
<p>
<code>
sub method1
{
my $self = shift;
... maybe do some stuff ...
$self->method2(@_);
... maybe do some more stuff ...
return $something;
}
# or even more simply
sub method2 { shift->method3(@_) }
</code>
<p>
Otherwise I always <code>my($c,...) = @_;</code>
<p>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-144739">
<em>--DrWhy</em>
<p>
<em>"If God had meant for us to think for ourselves he would have given us brains. Oh, wait..."</em>
</div></div>
442597
442808