in reply to Re^5: Operator overloading with returning lists?
in thread Operator overloading with returning lists?

Thx for the link, but the only thing that might explain what happens is lists do not exist in scalar context .

such that

DB<97> p Dumper scalar ( (1,2) x 5 ) $VAR1 = '22222';
transforms to
DB<101> p Dumper scalar(1,2) x 5 $VAR1 = '22222';

Cheers Rolf

UPDATE: after reading: http://perldoc.perl.org/perlop.html#Multiplicative-Operators I understand that the scalar context inhibits the parens around (1,2) !

Replies are listed 'Best First'.
Re^7: Operator overloading with returning lists?
by Anonymous Monk on Dec 01, 2008 at 15:39 UTC
    So which is it, bug or feature ?
      neither, it's just a flaw that (...) x returns a list and not an array.

      Cheers Rolf