Larry Wall wrote:
> Any other cute ideas?

If you have '\s', you'll also want '\S':

"$n cat\s fight\S" # 1 cat fights; 2 cats fight

I'm not fond of the 'ox\soxen' idea; but I could get behind something
like '\s<ox oxen>' or 'ox\s<en>'.

'\s<a b>' would mean 'a is singular; b is plural'
'\s<a>' would be short for '\s< a>'
'\s' would be short for '\s< s>'
\S<a b>' would reverse this.

Sometimes, you won't want the pluralization variable in the string
itself, or you won't know which one to use.  You could use an adverb
for this:

:s<$n>"the cat\s \s<is are> fighting."

and/or find a way to tag a variable in the string:

"$owner's \s=$count cat\s"

'\s=$count' means "set plurality based on $count, and display $count normally."

Jonathan "Dataweaver" Lang

Reply via email to