in reply to Data::Dumper and printf
The issue is that printf expects a format string as the first argument (thus the 'f'). When you pass the array reference to Dumper, it returns a single string, which printf interprets as its format string. When you pass Dumper the array, it returns an array of strings and so printf thinks the first argument is the format, and thus only prints that.
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Data::Dumper and printf
by Anonymous Monk on Nov 21, 2012 at 05:50 UTC | |
Re^2: Data::Dumper and printf
by Trihedralguy (Pilgrim) on Nov 21, 2012 at 00:05 UTC | |
by LanX (Saint) on Nov 21, 2012 at 17:05 UTC |
In Section
Seekers of Perl Wisdom