develooper Front page | perl.perl5.porters | Postings from December 2017

Re: [perl #131875] please correct perlfunc to tell when "sprintf@..." is useful

Thread Previous
Dave Mitchell
December 15, 2017 08:53
Re: [perl #131875] please correct perlfunc to tell when "sprintf@..." is useful
Message ID:
On Fri, Dec 15, 2017 at 07:19:54AM +0000, Zefram wrote:
> There is nothing to change here.  sprintf with an array as first argument
> is not useful, but scalar context is useful and, more importantly,
> likely to have code relying on it.  There's nothing more to say in the
> documentation, and we can't change the behaviour for backcompat reasons.
> This ticket should be closed.

I still intend at some point to add a warning when the first arg of
sprintf is an array, as in

    sprintf @foo ...

since that almost certainly represents a coding error.

You're only as old as you look.

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About