Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: What one-liners do people actually use?

by exussum0 (Vicar)
on Dec 08, 2005 at 19:03 UTC ( #515338=note: print w/ replies, xml ) Need Help??


in reply to What one-liners do people actually use?

dos2unix

perl -s -p -i -e '~s/\r//g' file.txt


Comment on Re: What one-liners do people actually use?
Download Code
Replies are listed 'Best First'.
Re^2: What one-liners do people actually use?
by ikegami (Pope) on Dec 08, 2005 at 20:29 UTC
    unix2dos (when run from "dos")
    perl -i.bak -ple1 file.txt
Re^2: What one-liners do people actually use?
by tphyahoo (Vicar) on Dec 09, 2005 at 10:45 UTC
    The s flag (process switches) is useless here, isn't it?
      Prolly so, it's just such a habit.. like doing ~s///g is for some. Yes, I've accidentally written stuff like ~s/a$//g; now and then just 'cause I do /g so much. ^^

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (17)
As of 2015-07-07 21:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls