A
Adrien BARREAU
Hello all.
Here is a piece of code that troubles me:
=====
$ perl -e 'my @a; @a = @a || 1..3;'
$ perl -e 'my @a; @a ||= 1..3;'
Can't modify private array in logical or assignment (||=) at -e line 1,
near "3;"
Execution of -e aborted due to compilation errors.
=====
It thought the "a operator= b" notation really was "a = a operator b",
but it seems it is wrong.
Does anyone have some information about this?
Adrien.
Here is a piece of code that troubles me:
=====
$ perl -e 'my @a; @a = @a || 1..3;'
$ perl -e 'my @a; @a ||= 1..3;'
Can't modify private array in logical or assignment (||=) at -e line 1,
near "3;"
Execution of -e aborted due to compilation errors.
=====
It thought the "a operator= b" notation really was "a = a operator b",
but it seems it is wrong.
Does anyone have some information about this?
Adrien.