* Steven Lembark <[EMAIL PROTECTED]> [2002-11-20 17:35]: > Yes, becuase if you did it this way you'd get $end equal > to the integer coult of the number of list arguments passed > plus one for the end value. Notice the usage: > > my $string = commify 90, ', ', 'etc...', @names; > > The other problem is that even if there were only three > arguments being passed in you have to check the count > before making the assignment and croak on @_ != 3 in > order to avoid an extra parameter causing $end to > become an integer count.
Enter splice. my ($max, $sep, $end) = splice @_, 0, 3; -- Regards, Aristotle