in reply to Shift versus Sanity

I concur with Juerd. Sometimes i will obfuscate, but only if it is for me and me only.

How many times have you been bitten with this:

sub foo { my $foo = shift; } # and then you decide to add another parameter: sub foo { my ($foo,$bar) = shift; }
I find it better to always use @_ to prevent those annoying mistakes:
sub foo { my ($foo) = @_; }


(the triplet paradiddle with high-hat)

Replies are listed 'Best First'.
Re: (jeffa) Re: Shift versus Sanity
by crazyinsomniac (Prior) on Apr 24, 2002 at 01:25 UTC