Re: @array = $scalar

2005-09-05 Thread Damian Conway
Juerd wrote: However, in general, chained operators like comma, junction constructors and infix zip, don't get an op= variant. > There's something nice in $foo = 42; $foo |= .bar for @quux; as an alternative for $foo = any 42, @quux>>.bar; though I had always assumed (e.g. in

Re: @array = $scalar

2005-09-01 Thread Juerd
Stuart Cook skribis 2005-09-01 22:49 (+1000): > [1] i.e. magically applies itself to any valid infix operator, just > like »« and [] do , is not a normal binary infix operator. It's not even binary, although it can of course be used with only two operands. Juerd -- http://convolution.nl/maak_ju

Re: @array = $scalar

2005-09-01 Thread Juerd
Ashley Winters skribis 2005-09-01 0:58 (-0700): > If list construction is via the &infix:<,> operator, does that mean a > blasphemous sinner could create &infix:<,=> as a synonym for push? You could do that even without , being a list constructor. However, in general, chained operators like comm

Re: @array = $scalar

2005-09-01 Thread Stuart Cook
On 01/09/05, Ashley Winters <[EMAIL PROTECTED]> wrote: > If list construction is via the &infix:<,> operator, does that mean a > blasphemous sinner could create &infix:<,=> as a synonym for push? If the self-assignment metaoperator works the way I think it does[1], then you shouldn't even need to

Re: @array = $scalar

2005-09-01 Thread Ashley Winters
On 8/31/05, Ingo Blechschmidt <[EMAIL PROTECTED]> wrote: > Hi, > > @array = $scalar;# really means > @array = ($scalar,); # same as If list construction is via the &infix:<,> operator, does that mean a blasphemous sinner c

Re: @array = $scalar

2005-08-31 Thread mark . a . biggar
I think this deserves at least a compile time warning and also a strict pragma to make it an error as it is most likely not what the programmer wanted. -- Mark Biggar [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] > Ingo Blechschmidt skribis 2005-08-31 13:22 (+): > > @array = $ar

Re: @array = $scalar

2005-08-31 Thread Juerd
[EMAIL PROTECTED] skribis 2005-08-31 15:50 (+): > I think this deserves at least a compile time warning and also a > strict pragma to make it an error as it is most likely not what the > programmer wanted. I do not think that using a scalar in list context deserves a warning. Juerd -- http:

Re: @array = $scalar

2005-08-31 Thread Juerd
Ingo Blechschmidt skribis 2005-08-31 13:22 (+): > @array = $arrayref; # really means > @array = ($arrayref,); # same as > @array = (); @array[0] = $arrayref; # thus > say [EMAIL PROTECTED]; # always 1 > # Correct?

@array = $scalar

2005-08-31 Thread Ingo Blechschmidt
Hi, @array = $scalar;# really means @array = ($scalar,); # same as @array = (); @array[0] = $scalar; # Correct? @array = $arrayref; # really means @array = ($arrayref,); # same as @array