#!/usr/local/bin/perl -w use strict; { if (my $x = (maybe_undef_maybe_not () || 0)) { print "Not Zero\n"; } else { print "Zero\n"; } } sub maybe_undef_maybe_not { return undef; }