Dear all

I've recently come across a file, i think it's from a mac, which, on my RH9 box, shows it's line breaks as:

'^M'.

As a result of which, when trying to read in the file, it does NOT read in any lines, or so I believe.

has anyone come across this before?

Cheers
Sam

UPDATE:

The code belwo is basically what I'm using, and there's NO output.

#!/usr/bin/perl -w use strict; my $file = $ARGV[0]; while(<$file>){ print $_; }

the file looks a little like this, remember the linebreaks are '^M':

ATOM 5 OE2 GLU A 3 116.164 67.506 12.993 1.00129.84 8^MATOM 6 C GLU A + 3 115.793 66.073 17.878 1.00101.37 6^MATOM 7 O GLU +A 3 116.641 65.434 18.500 1.00 95.58 8^MATOM 8 N GLU A 3 117.2 +31 68.120 18.071 1.00102.98 7^MATOM 9 CA GLU A 3 11 +5.864 67.588 17 .783 1.00103.63 6^MATOM 10 N GLU A 4 114.768 65.506 +17.255 1.00 97.10 7^MATOM 11 CA GLU A 4 114.577 64.06 +7 17.260 1.00 9 1.36 6^MATOM 12 CB GLU A 4 113.440 63.684 18.207 1.00 + 99.04 6^MATOM 13 CG GLU A 4 113.897 63.263 19.592 1 +.00118.55 6^MAT OM 14 CD GLU A 4 112.731 62.936 20.505 1.00127.23 6^M +ATOM 15 OE1 GLU A 4 111.851 62.147 20.096 1.00129.74 +8^MATOM 16 O E2 GLU A 4 112.699 63.467 21.635 1.00130.22 8^MATOM 17 + C GLU A 4 114.281 63.539 15.867 1.00 84.90 6^M

In reply to finding different linebreaks with <> by seaver

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.