#!/usr/bin/perl -wT use strict; my ($x,$y,$z) = (undef,'hello',undef); $_ ||='' for $x,$y,$z; print "x='$x' y='$y' z='$z'\n"; ## OR EVEN (most idiomatic imho) $_||='' for my($a,$b,$c)=(undef,9,undef); print "a='$a' b='$b' c='$c'\n";