develooper Front page | perl.perl6.language | Postings from March 2005

Re: A possible solution for s?pintf

Thread Previous | Thread Next
From:
Juerd
Date:
March 12, 2005 16:01
Subject:
Re: A possible solution for s?pintf
Message ID:
20050313000139.GU30120@c4.convolution.nl
Larry Wall skribis 2005-03-12 15:55 (-0800):
> Well, we do already have:
>     print $foo.as('%03d'), $bar.as('%15s')
> which works on interpolated values as well.  It als puts the variable
> name out front, since the name is more important than the pattern in
> most cases.

It puts the variable name out front, which is great, but it also puts
the second variable name allll the way to the right, after the line
noise.

> I don't see that this buys us anything over just shortening "sprintf"
> to something shorter, like:
>     print as '%03d %15s', $foo, $bar;

I like it, although in more complex lists, it still requires the parens
that I so like to avoid. I could certainly live with a list op as short
as 'as', though! 


Juerd
-- 
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html 
http://convolution.nl/gajigu_juerd_n.html

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About