http://qs1969.pair.com?node_id=515338


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

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

Replies are listed 'Best First'.
Re^2: What one-liners do people actually use?
by ikegami (Patriarch) 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. ^^