perl -MO=Deparse,-P -e 'if($_ = (m/foo/)) { print 'hi' }' if ($_ = /foo/) { print hi $_; } -e syntax OK