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"; } #### There is 1 piece of pizza left! There are 2 pieces of pizza left! There are 3 pieces of pizza left!