From: Michael Turley (samplecode at domain yahoo.com)
Date: Fri 05 May 2000 - 04:22:23 IST
I wrote:
> Does anyone know of a quick way to get rid of ^M
> from multiple files of the same format?
A nice Perl way (almost entirely stolen from the Perl
cookbook) is (you can lose the g I reckon as there
should only be one ^M per line):
#!/usr/local/bin/perl
local $^I = '.old';
local at domain ARGV = glob("*.htm");
while (<>) {
s/\r//g;
print;
} continue {close ARGV if eof}
=====
Mr. Michael Turley
Gracious winner, Generous lover, All round great guy.
__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:06:02 GMT