in reply to serial comma function
My understanding of English grammar is that a comma should not precede an 'and' statement when describing a list - If I am mistaken on this understanding, please feel free to enlighten me. Be that the case however, I would rewrite your function as follows:
sub serial { join( ', ', @_[ 0..$#_-1 ] ) . ( @_ > 1 ? ' and ' : '' ) . $_[-1] }
perl -le 'print+unpack("N",pack("B32","00000000000000000000001001001011"))'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: serial comma function
by Your Mother (Archbishop) on Apr 15, 2003 at 03:07 UTC | |
|
Re: Re: serial comma function
by Anonymous Monk on Apr 15, 2003 at 05:57 UTC |