On Tue, Jul 04, 2006 at 05:27:33PM +0100, Nicholas Clark wrote:
: I'm not convinced that sprintf needs an operator. It's not commonly used in
: any code I've looked at, which to me suggests that it's not good huffman
: coding to use up a terse symbol for it, denying that symbol to something
: else.
Well, we kinda do have an operator already, if you consider infix:<as> to
be a variant of .as().
$c as '%03d'
$c.as('%03d')
but it's arguable which is better in a string:
$a = "{$c as '%03d'}"
$a = "$c.as('%03d')"
But that's backwards from Python's % operator. Actually, I think I like
the Perl way better for single patterns... :)
Larry