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 (Saint) 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