Steve Massey wrote:
> 
> Hi

Hello,

> I though I had sussed this s/ stuff but
> 
> #! /usr/bin/perl -w
> 
> $test =  "BRIGHTON,,,,,,,,,,,,,,,, (Firm),,,,,,,,,,,,,,,,,,,,,,,,,,,,";
> 
> print "$test\n";
> $test =~ s/,*/,/;
> $test =~ s/,*$/,/g;
> 
> print "$test\n";
> 
> does not work, I want to substitute all multiple commas into a single one.

You should use tr/// instead of s///.  :-)

$test =~ tr/,//s;


John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to