How do I stop Eclipse (EPIC Perl) from adding DOS CR/LF to my Perl scripts?

I use Eclipse on Windows to edit files on a remotely mounted Linux SMB share.

Coupled with Samba's stubborn opposition to on-the-fly mapping, Eclipse's insistence on CR/LF creates a real headache with Perl scripts.

Any workarounds?


In Eclipse, the end-of-line sequence setting can be found under Window > Preferences > General > Workspace > "New text file line delimiter".

I just stumbled upon an easy way of fixing these problems when you run into someone else's code that has them.

In Eclipse Kepler (and later), use the menu item File > Convert Line Delimiters To.

In previous versions of Eclipse, you have to user Source > Format. It'll reformat the code, which includes replacing CR/LFs with LFs.

Or maybe you just have to uncheck this flag : Window/Preferences/General/Editors/Text Editors/Show whitespace characters

Need Your Help

Remove first character from a string if it is a comma

javascript regex string

I need to setup a function in javascript to remove the first character of a string but only if it is a comma ,. I've found the substr function but this will remove anything regardless of what it i...

How to change the character encoding in UIWebView?

iphone ios character-encoding uiwebview

Summary of the problem: When browsing non-English sites that does not explicitly specify the correct character encoding with UIWebView on the iOS, the page cannot be displayed correctly.