Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Removing carriage returns from source code

by Anonymous Monk
on Nov 03, 2001 at 06:29 UTC ( [id://122991]=note: print w/replies, xml ) Need Help??


in reply to Removing carriage returns from source code

It might be those annoying ^M's.
<CODE>
#!/usr/locl/bin/perl

while(<>) {
s/\cM//g;
print;
} <CODE>
~
:w no_cM.pl
% ./no_cM.pl < annoying_file.txt > ahhh.txt
  • Comment on Re: Removing carriage returns from source code

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://122991]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (2)
As of 2024-04-25 19:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found