On Sat, Jan 26, 2008 at 08:58:43AM -0800, Larry Wall wrote:
> After a recent exchange on PerlMonks about join, I've been thinking
> about the problem of pluralization in interpolated strings, where we
> get things like:
> 
>     say "Received $m message{ 1==$m ?? '' !! 's' }."
> 
> My first thought is that this is such a common idiom that we ought
> to have some syntactic sugar for it:
> 
>     say "Received $m message\s."
>
> [...]
>
> Any other cute ideas?  

FWIW, this sounds to me a lot like a special quoting operator or
adverbial form.

    say qq:pluralized "Received $m message\s".

Pm

Reply via email to