Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: sprintf( @_ ) doesn't do what I want!

by huck (Prior)
on Oct 30, 2019 at 02:46 UTC ( #11108103=note: print w/replies, xml ) Need Help??

in reply to sprintf( @_ ) doesn't do what I want!

Unlike printf, sprintf does not do what you probably mean when you pass it an array as your first argument. The array is given scalar context, and instead of using the 0th element of the array as the format, Perl will use the count of elements in the array as the format, which is almost never useful.

  • Comment on Re: sprintf( @_ ) doesn't do what I want!

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11108103]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2022-12-03 19:02 GMT
Find Nodes?
    Voting Booth?

    No recent polls found