Help - Search - Member List - Calendar
Full Version: \n & ^M
WebHost Freaks Forums > Webmaster Resources > Perl Beginner Help
Support our Sponsors!
Dan Klose
Hi everybody,

I have exported an EndNote 7 Library on my Mac to a Bibtex formatted
plain text file. When I look at the file, rather than having lines
ending with 'n' I seem to have '^M'. I think this is a Mac end of line
problem but the things I have tried don't work and I was wondering if
anyone had any ideas/bits of code to get round this.

Thanks

Dan.

Xavier Noria
On Jun 22, 2005, at 11:07, Dan Klose wrote:

QUOTE
Hi everybody,

I have exported an EndNote 7 Library on my Mac to a Bibtex formatted
plain text file.  When I look at the file, rather than having lines
ending with 'n' I seem to have '^M'. I think this is a Mac end of
line
problem but the things I have tried don't work and I was wondering if
anyone had any ideas/bits of code to get round this.

If there are no ns then you could do just this:

perl -pi -we 's/15/n/g' filename

Note that since $/ is n the file will be slurped by -p.

-- fxn


PHP Help | Linux Help | Web Hosting | Reseller Hosting | SSL Hosting
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2005 Invision Power Services, Inc.