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

Re: win2unix

by atcroft (Monsignor)
on Jul 20, 2002 at 08:08 UTC ( #183569=note: print w/replies, xml ) Need Help??


in reply to win2unix

perl -p -i.bak -e "s/\r//" filename loops thru filename, removing the ^M characters (\r), and creates a backup with .bak appended to the filename-a commonly used one-liner to do the same thing. (.bak could be replaced with something else, or left off if no backup is desired)

Update: No need to feel embarassed-I would be willing to bet that most of us have written a script to do that same thing before. Appreciate the fact that you looked at a problem and came up with a good solution which dealt relatively effectively with contingencies, and chalk it up to practice in growing in your abilities to use perl effectively. Reinventing the wheel isn't always bad, if you gain a better understanding of that wheel and don't try to reinvent the same one too often.

Replies are listed 'Best First'.
Re: Re: win2unix
by ackohno (Scribe) on Jul 20, 2002 at 08:15 UTC
    ::slams head on keyboard::
    talk about embarrasing...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://183569]
help
Chatterbox?
Discipulus shall be damned all progs that do not provide different font size!
[Corion]: Yeah - that's one important thing why I like to run my presentations from my browser. Ctrl+ and Ctrl- are incredibly helpful there to make sure everybody can read stuff

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2017-09-26 09:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (293 votes). Check out past polls.

    Notices?