in reply to Re: Re: Make things a *little* easier
in thread a farewell to chop

Now that would be something I'd like to see in Perl 6 (and which I have missed in the Perl 5 version of the function on a number of occasions).

Makeshifts last the longest.

Replies are listed 'Best First'.
Re^4: Make things a *little* easier
by John M. Dlugosz (Monsignor) on Sep 12, 2002 at 20:03 UTC
    You seem to be getting different results than mdillon. That's the problem with relying on undocumented details. If you write a sub starting with my ($a,$b,$c,$d)=@_; and then calculate defaults if undef or use the undef value for some special meaning, then leaving off args naturally gives the same results. But if you write if (scalar(@_) < 4) ... to do something different, then using undef doesn't give the same effect.