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: "Marcotte, Lawrence" <Lawrence dot Marcotte at LibertyMutual dot com>
Subject: RE: trailing commas in result set
Date: Oct 6 1997 2:07PM

By escaping the plus sign you are treating it literally.  If I am not
mistaken, your regex is looking for a comma followed by a plus sign at
the end of a line.
=======================================================
Larry Marcotte
Liberty Mutual
Senior Technical Training Specialist                           225
Borthwick Ave
Phone: 1 603-431-8400 x53064                               Mail Drop -
01S
Fax:   (603) 431-1204
Portsmouth NH
mailto:Lawrence.Marcotte@LibertyMutual.com        03801



On Monday, October 06, 1997 8:34 AM, Mabbett, Lane
[SMTP:lane.mabbett@exsc01.exch.eds.com] wrote:
> I'm trying to trim off trailing commas in my result set returned by
> Sybase. 
> What's wrong with my row =~/,\+//;
> 
> Thanks
> 
> %row = &dbnextrow($dbproc, 1);
>     while (%row = &dbnextrow($dbproc, 1))
>     {
>     row =~ /,\+$//;
>     print "$row{'prov_name'}, ,
"; > print "Specialty: $row{'description'},
"; > print "$row{'prov_address1'},
"; > print "$row{'prov_address2'},
"; > print "$row{'prov_city'} "; > print "$row{'prov_state'}, "; > print "$row{'prov_zip'},
"; > print "$row{'prov_phone'},
"; > print "

", "\n"; > } > > lane.mabbett@eds.com > 75 Sgt. Wm. B. Terry Drive > Hingham, MA 02043 > 617-741-3444 > fax 617-741-3420