>perl -we "if (undef = $foo) { print 'bar' }" Name "main::foo" used only once: possible typo at -e line 1. Modification of a read-only value attempted at -e line 1. >perl -we "if ($foo = undef) { print 'bar' }" Name "main::foo" used only once: possible typo at -e line 1.