Try this:
$test =~ s/ / /g;
Or, possibly better:
$test =~ s/(\s)+/$1/g;
-WM <><
-----Original Message-----
From: Johnno [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 24, 2000 5:25 AM
To: [EMAIL PROTECTED]
Subject: taking the extra spaces out..
Hello,
I was wondering if any knew of a way to taking out 2 spaces and just leave
one..
ie.. hello world = hello world..
when i tried i got all sorts of problems.. the piece of code i was using
is..
$text =~ s/\ /\ /g;
any ideas??
Johnno
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web
