...and is it a good idea? I found today in one of my own programs:
use strict; use warnings; #... #... my $s; # declared, but uninitialized #... #... $s .= some_expression() for @some_list;
And Perl said nothing. Quick check shows, that those of "combined assignment operators" which can be classified as "adders", or which assign (and thus return) their RH argument, if LH argument is uninitialized (i.e. +=, -=, .=, |=, ^=, ||=, //=) (well, negated in case of -=, of course), do not produce a warning. While others do. Therefore, it looks like it was done on purpose. It seems DWIMish, and thus maybe a right thing to do, but is it documented, at least?