$ perl -MO=Deparse -e '@bar ||= (1,2,3)' Can't modify array dereference in logical or assignment (||=) at -e line 1, at EOF -e had compilation errors. @bar ||= ('???', '???', 3); $ perl -MO=Deparse -we '@foo ||= 1' Can't modify array dereference in logical or assignment (||=) at -e line 1, at EOF -e had compilation errors. BEGIN { $^W = 1; } @foo ||= 1;