Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: Data::Dumper and printf

by Trihedralguy (Pilgrim)
on Nov 21, 2012 at 00:05 UTC ( #1004823=note: print w/replies, xml ) Need Help??


in reply to Re: Data::Dumper and printf
in thread Data::Dumper and printf

That is what I was thinking, but I wasn't completely sure that this was the answer to the question. One of my peers asked me why this was working the way it was and I wasn't 100% sure what the correct answer was. Thank you for your explanation.

Replies are listed 'Best First'.
Re^3: Data::Dumper and printf
by LanX (Chancellor) on Nov 21, 2012 at 17:05 UTC
    one confusing thing is that printf and sprintf have different prototypes!

    DB<108> prototype "CORE::sprintf" => "\$\@" DB<109> prototype "CORE::printf" => undef

    so sprintf @array will evaluate the array in scalar context, such that now the number of elements will be interpreted as format string...

    Cheers Rolf

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1004823]
help
Chatterbox?
[shmem]: sounds good.
[shmem]: but I'm crumbling smaller stones. remember...
[stevieb]: I'm working on it to fatten it up and make it more reliant so I can finalize my Raspberry Pi automated build system for that software :) It's all well and fun, until I try to make it work with Windows lol
[shmem]: "debugging a program is more difficult than to write it in the first place. If you code your program as smart as you are, you are, by definition, too dumb to debug it."
[stevieb]: I literally laughed. That's good :) Perhaps I just need to go climb another mountain and forget about it

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2017-03-28 22:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (342 votes). Check out past polls.