On 5/20/05, Rafael Garcia-Suarez <[EMAIL PROTECTED]> wrote:
> Yitzchak Scott-Thoennes wrote:
> > > $ bleadperl -le 'print for qw(foo bar) x 2'
> > > foo
> > > bar
> > > foo
> > > bar
> >
> > That's the opposite of what I was trying to say.
> 
> Yes, I'm quite aware of this :) A "nonetheless" is missing in my
> previous mail.
> 
> > I think of ()x and x
> > as being two separate operators, that happen to behave the same in
> > scalar context.  I don't think the list form should apply if there aren't
> > explict parens around the left operand.
> 
> Yes... but from a DWIM point of view I think that people are used to
> assume () around qw lists; or to see qw just as another form of lists.
> And (qw(foo bar)) is just clutter, since qw(foo bar) x 3 is not going to
> be used usefully.

theres precedence for this interpretation as well:

D:\dev>perl -wle "use strict; for my $x qw(foo bar baz) { print $x }"
foo
bar
baz

-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

Reply via email to