<?xml version="1.0" encoding="windows-1252"?>
<node id="654342" title="Re^3: Why should I use perl 5.10?" created="2007-12-01 11:47:48" updated="2007-12-01 06:47:48">
<type id="11">
note</type>
<author id="510280">
shmem</author>
<data>
<field name="doctext">
The qw() operator provides list context already. So
&lt;c&gt;
print ( qw(a b c) x 3 ); 
&lt;/c&gt;
&lt;p&gt; yields the same result as
&lt;c&gt;
@l = qw(a b c);
print ( (@l) x 3);
&lt;/c&gt;
&lt;p&gt; which makes sense imho. An array isn't a list, but a qw() expression &lt;i&gt;is&lt;/i&gt;.
&lt;p&gt;update: as a reminder, this is from [doc://perlop]:
&lt;blockquote&gt;&lt;small&gt;
Binary "x" is the repetition operator.  In scalar context or if the left operand is not enclosed in parentheses, it returns a string consisting of the left operand repeated the number of times specified by the right operand.  In list context, if the left operand is enclosed in parentheses or is a list formed by "qw/STRING/", it repeats the list.  If the right operand is zero or negative, it returns an empty string or an empty list, depending on the context.
&lt;/small&gt;&lt;/blockquote&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-510280"&gt;
&lt;p&gt;--shmem
&lt;small&gt;&lt;small&gt;&lt;pre&gt;
_($_=" "x(1&lt;&lt;5)."?\n".q&amp;middot;/)Oo.  G&amp;deg;\        /
                              /\_&amp;macr;/(q    /
----------------------------  \__(m.====&amp;middot;.(_("always off the crowd"))."&amp;middot;
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e &amp;&amp; print}&lt;/pre&gt;&lt;/small&gt;&lt;/small&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
654042</field>
<field name="parent_node">
654259</field>
</data>
</node>
