#!/usr/bin/perl use strict; use warnings; my $test2; my $test = 'foo' . (1==1 ? 'bar' && $test2 = 2 : '') ; print "$test\n$test2\n";