Q+DV:

while (<IN>)
        {
        s/\s\s/\ /g;
        print OUT $_;
        }


(Assuming IN is an already open filehandle to the source file, and OUT is one to a 
destination file.)

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Saturday, November 22, 2003 11:58 AM
To: [EMAIL PROTECTED]
Subject: Removing double spaces from a file


What is the quickest and simplest method of ensuring a plain text file only has one 
space between each word?


--
Rich Mellor 
RWAP Services
35 Chantry Croft, Kinsley, Pontefract, West Yorkshire, WF9 5JH
TEL: 01977 610509
Visit our website at:
URL:http://www.rwapsoftware.co.uk

In need of adventure?
URL: http://www.rwapadventures.com

Stuck with ordinary dial up internet connection ?? 
Read our review of internet accelerators and broadband at:
URL:http://www.rwapservices.co.uk

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to