perl -e 'my $tmp; if( $tmp and ( $tmp eq "" ) ) { print "In\n" } else { print "Out\n" }' Out