sub and_a_list { my $r = join(', ', @_); my $pos = rindex($r, ', '); substr($r, $pos, 2) = ' and ' if $pos > -1; $r; }