Steven Lembark wrote:
> 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;
>

D'oh! (slaps head).  Serves me right for not reading your code properly.  I
blame a lack of caffeine.

A. Pagaltzis wrote:
> Enter splice.
>
> my ($max, $sep, $end) = splice @_, 0, 3;

That has brevity, certainly, but for legibility, I think I prefer Steven's
original (shift,shift,shift)

Andrew

Reply via email to