sub and_a_list { if (@_ > 2) { join ", ", @_[0..$#_-1], " and $_[-1]" } elsif (@_ > 1) { "$_[0] and $_[1]" } elsif (@_ > 0) { $_[0] } else { "" } }