On Fri, 14 Jun 2002 00:21:16 -0400, Michael G Schwern wrote:

>The history is someone noticed that since this:
>
>      my $foo;  $foo = $foo . 42
>      Use of uninitialized value at -e line 1.
>
>and this:
>
>      my $foo;  $foo .= 42
>
>are logically the same, the former shouldn't warn. 

Perhaps... (I feel like disagreeing, though.)

Anyway:

        my($foo, $bar);  $foo = $bar . 42;

*should* warn. Only in the exceptional case where the lvalue on the left
is identical to the lvalue first thing on the right, the warning might
be dropped. Well: it doesn't warn. That makes no sense at all, either
'.' should warn (pretty much) always, or never.

And that's where my disagreement kicks in. The rules used to be much
simpler: '.' warns, '.=' doesn't. I feel that rule make much more sense,
"logically the same" or not. If you don't want the warning, use '.='.

-- 
        Bart.

Reply via email to