sybperl-l Archive
Up Prev Next
From: Bob Willmot <bwillmot at drms_dev6 dot sbi dot com>
Subject: Re: trailing commas in result set
Date: Oct 6 1997 2:53PM
John Gilmore-Baldwin writes:
> Perhaps I'm missing something, but shouldn't the command be:
>
> $row{$key} =~ s/,$//; #remove comma at end of string
>
> Where does the "\+" come in? This would cause it to search for a comma
> followed by a plus sign anywhere in the string.
well I meant
$row{$key} =~ s/,+$//;
the plus is to pick up 1 or more commas (since the original mail
mentioned commas - not comma)
It shouldn't be escaped (\+) since that would match a literal '+' a
the end of the string.
______________________________________
Bob Willmot Salomon Brothers
bwillmot@sbi.com (212)783-4217
|