Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Is there a good way to unify text files something like dos2nix shell script(s) do?

by Laurent_R (Vicar)
on Dec 20, 2013 at 18:54 UTC ( #1067979=note: print w/ replies, xml ) Need Help??


in reply to Is there a good way to unify text files something like dos2nix shell script(s) do?

Perhaps a starting point on trailing spaces and Windows carriage returns from the a*.pl files in the current directory:

$ perl -i.bak -pe 's/\s*[\r\n]+$/\n/g;' ./a*.pl


Comment on Re: Is there a good way to unify text files something like dos2nix shell script(s) do?
Download Code
Re^2: Is there a good way to unify text files something like dos2nix shell script(s) do?
by taint (Chaplain) on Dec 20, 2013 at 19:04 UTC
    merci! Laurent_R.

    I use something similar, myself. But I'm not inclined to make any changes to any of the files, until I've managed to discover their encoding, and then change them (successfully) into utf-8. Otherwise, I often end up with "mojibake" -- Mojibake.

    Thanks again, for taking the time to reply, Laurent_R.

    --Chris

    Yes. What say about me, is true.
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2014-07-14 04:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (254 votes), past polls