On Mon, Apr 23, 2018 at 3:53 PM, Ed Avis <perlbug-followup@perl.org> wrote: > This is probably a mistake: > > ($foo, $bar) = $baz; > > In my case it usually means that I wanted @{$baz} instead. > For other programmers there might be some other reason. > But surely it cannot be intentional. > Oh, but it can. You never know what other programmers might do intentionally. > A compile-time warning should be given when an assignment statement > has a list of two or more items on the LHS, and the RHS is a scalar > variable expression that begins with a $ sign. > Sounds like this will break (well, start warning) on the common (quick and dirty) slurp idiom: my $text = do { local (@ARGV, $/) = $filename; <> } ; .. and that's just off the top of my head. Do we really want "style" warnings on correct and intentional code? EirikThread Previous | Thread Next