sub pl { $count == 1 ? 0 :1 } # check plural my @s=("","s"); my @are=qw/is are/; for $count (1..3) { print "There $are[pl] $count piece$s[pl] of pizza left!\n"; }