You don't need to match the entire string, just the bit you want to modify.
my $myNames = "Jones, Smith, Baker, Johnson,"; $myNames =~ s/,$//;
In reply to Re: Eliminating last comma
by dorward
in thread Eliminating last comma
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |