in reply to Format a list with commas and "and"
sub serial(@) { join(', ', @_[0..$#_-1]) . (@_>2 ? ',':'' ) . (@_>1 ? (' and ' . $_[-1]) : $_[-1]); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Format a list with commas and "and"
by BrowserUk (Patriarch) on Oct 02, 2002 at 09:43 UTC |