$ perl -MO=Deparse,-p -e '$expression ? $var = "foo" : $var = "bar";' (($expression ? ($var = 'foo') : $var) = 'bar'); -e syntax OK