in reply to Re: Shift versus Sanity
in thread Shift versus Sanity
my ($obj, $usr_log_file, $params) = @_;Extra params passed by the user are discarded, as one would expect.
What, exactly, are the parameters to this function? You have to read and understand the entire function before it becomes clear. If this were much larger, that could be very frustrating. Unfortunately, this fictional example is not too far fetched.sub foo { my $self = shift; my $foo = shift; $self->something($foo, "bar", shift, "shift", "foo"); my ($flob,$blarg,$kvetch) = (shift,shift); if ($kvetch = $flob->fnordicate($blarg)) { shift()->refnordicate($kvetch); } }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re^2: Shift versus Sanity
by Anonymous Monk on Apr 24, 2002 at 17:50 UTC |