Re: help slurping a file-- Solved -- Thanks for responses



> In Mac OS X the newline is \012 and that is what "\n" is eq to. I was
> told in MacPerl (for MacOS pre X) the underlying codes of \n and \r
> were switched (wrt to the rest of platforms), but still \n is the
> logical newline everywhere.

--The specs the file was created from:

Filemaker version 5.5, Mac OS 10.4

The newline character is in this case decimal 013 (oct \015).
I found this out by parsing each character out in java, and looking at the
byte code.
I thought the "\n" --dec 10, (oct \012) was standard too, but here is a case
where it is clearly isn't.
I think it might be a Mac issue, since as a test, my collaborator opened it
in "Text Wrangler" and saved it with Unix safe endings, with the same
results.
I'm not really a Mac person, so this threw me off a bit.

Renee


Quoting Xavier Noria <fxn@xxxxxxxxxxx>:

> On Oct 28, 2005, at 15:09, Jeff 'japhy' Pinyan wrote:
>
> > On Oct 28, Renee Halbrook said:
> >
> >
> >> My perl interpreter display does not recognize "\r" for a newline
> >> character
> >> for standard out, so it simply printed the same line over on top
> >> of the
> >> previous line, making it look like it was only reading one line
> >> total.
> >> The slurping was working fine, but the display was not what I
> >> anticipating.
> >>
> >
> > That's not Perl's issue. That's your terminal's issue. And it's
> > not an "issue", because that's what \r is supposed to do. \r is a
> > carriage return, which only means the cursor is brought back to the
> > beginning of the line.
> >
> > (Except maybe on Macs, I don't know. That's weird. I don't use a
> > Mac, though, so I can't be sure.)
>
> In Mac OS X the newline is \012 and that is what "\n" is eq to. I was
> told in MacPerl (for MacOS pre X) the underlying codes of \n and \r
> were switched (wrt to the rest of platforms), but still \n is the
> logical newline everywhere.
>
> -- fxn
>



>
> --
> To unsubscribe, e-mail: beginners-unsubscribe@xxxxxxxx
> For additional commands, e-mail: beginners-help@xxxxxxxx
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
>
>
>


Renee Halbrook
Bioinformatics Programmer
The Carnegie Institution of Washington
Department of Plant Biology
260 Panama Street
Stanford, CA 94305
.



Relevant Pages

  • Re: Good Looking UI for a stand alone application
    ... Now go try to run one of your Dabo apps on a Mac ... and then tests it on the other platforms. ... progress bars are native Aqua bars, ...
    (comp.lang.python)
  • Re: Parallels 3: Windows games in OSX
    ... And yet again we see Windows being used to advocate the Mac. ... legacy applications on legacy OSes. ... Creating OS agnostic platforms and applications is great. ...
    (comp.sys.mac.advocacy)
  • Re: Help with what equipment is needed
    ... through and across most enterprise platforms around - including SunOS ... editing video and images (to get the thread slighlty on topic - the ... Friends in the graphic agency business who've diversified into video ... promotion would disagree with you about the Mac for video. ...
    (uk.rec.video.digital)
  • Re: Parallels 3: Windows games in OSX
    ... And yet again we see Windows being used to advocate the Mac. ... legacy applications on legacy OSes. ... Creating OS agnostic platforms and applications is great. ...
    (comp.sys.mac.advocacy)
  • Re: Graph does not appear in Powerpoint exported froom Mac to a PC
    ... This is one of the curses of having to work both platforms, ... use to successfully go back and forth between the Mac and the PC. ... I've had to recreate the offending graph, ... make sure to QUIT Powerpoint before sending the ...
    (microsoft.public.mac.office.powerpoint)