perl -wle' my $order; print "undef" if ($order or 0 eq "name"); $order = ""; print "empty string" if ($order or 0 eq "name"); $order = "name"; print "name" if ($order or 0 eq "name"); $order = "not name"; print "not name" if ($order or 0 eq "name");' name not name