Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: can't see ^M to process.

by JediWizard (Deacon)
on Jul 19, 2005 at 14:52 UTC ( [id://476137]=note: print w/replies, xml ) Need Help??


in reply to can't see ^M to process.

A shorter version of ikegami's code:

perl -pi -e 's/\015//g' Filename

They say that time changes things, but you actually have to change them yourself.

—Andy Warhol

Replies are listed 'Best First'.
Re^2: can't see ^M to process.
by xorl (Deacon) on Jul 19, 2005 at 17:56 UTC
    Even shorter
    perl -e 's/\r//g' Filename
      that won't work. I guess you mean:
      perl -pi -e 's/\r//g' Filename
      but, most of the time, only the cr on the end is to be removed:
      perl -pi -e 's/\r$//' Filename

      Paul

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2024-04-19 10:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found