Try one of these: $_=~ s/\s+//sg; $_ =~ s/^\s+//; #Removing leading spaces
Nicu Ionita wrote: > > > > 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.) > > This doesn't work. It's better: > > while (<IN>) > { > s/\s{2,}/ /g; # these is a space > print OUT $_; > } > > Nicu > > _______________________________________________ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs