PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

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