<?xml version="1.0" encoding="windows-1252"?>
<node id="1004814" title="Re: Data::Dumper and printf" created="2012-11-20 17:52:04" updated="2012-11-20 17:52:04">
<type id="11">
note</type>
<author id="712372">
kennethk</author>
<data>
<field name="doctext">
The issue is that [doc://printf] expects a format string as the first argument (thus the 'f').  When you pass the array reference to &lt;c&gt;Dumper&lt;/c&gt;, it returns a single string, which &lt;c&gt;printf&lt;/c&gt; interprets as its format string.  When you pass &lt;c&gt;Dumper&lt;/c&gt; the array, it returns an array of strings and so &lt;c&gt;printf&lt;/c&gt; thinks the first argument is the format, and thus only prints that.

&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-712372"&gt;
&lt;hr /&gt;
&lt;p&gt;#11929 First ask yourself `How would I do this without a computer?'  Then have the computer do it the same way.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
1004812</field>
<field name="parent_node">
1004812</field>
</data>
</node>
