<?xml version="1.0" encoding="windows-1252"?>
<node id="731572" title="Re^7: Use of wantarray Considered Harmful" created="2008-12-19 11:01:20" updated="2008-12-19 11:01:20">
<type id="11">
note</type>
<author id="85580">
dragonchild</author>
<data>
<field name="doctext">
What I meant by that was that the subroutine should always return the same information - changing context should be lossless. Hence, an array vs. an iterator (or an arrayref). But, not an array vs. the first element.
&lt;p&gt;As for your examples: localtime does array vs. joined array. That's on the border of acceptable. The diamond operator and readline are lossless - they are their own iterators (which is another rant for another day). m//g always returns a list - what you do with that list is your decision.
&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-85580"&gt;
&lt;hr&gt;
My criteria for good software:
&lt;ol&gt;
&lt;li&gt;Does it work?
&lt;li&gt;Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
&lt;/ol&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
729965</field>
<field name="parent_node">
730266</field>
</data>
</node>
