[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Executing MacPerl script on a PeeCee



On Mon, 12 Apr 1999, Doug McNutt wrote:

> Chris is absolutely right! I was fooled by the fact that M$Word on the
> PeeCee opened the transmitted x.pl file just fine. Apparently that piece of
> software recognizes the Mac return convention and doesn't bother to say
> anything about it. Doing a "save as" from Word on the PeeCee allowed the
> script to execute.
> 
I'd strongly recommend using a decent text editor like UltraEdit if you're
going to work with text files on Windows. These, just like Alpha (and i
assume, BBEdit) will recognize line-endings and can convert between OS's.

It's a real stretch of the word "recognize" to say that that is what Word
is doing when it opens up a Mac text file.

> Also: I had placed a test for the "MacOS" in my script and changed to "\r\n"
> for the line terminator in my output files. That's wrong. Apparently perl on
> the PeeCee puts out the right thing when you simply specify \n. That means
> \n is the right terminator to use for output for all three systems. Just why
> the perl parser doesn't recognize all three, as does M$Word, is a mystery
> beyond my simple mind.
> 
Perl on *every* OS puts out the right thing when you output \n, which is
the logical newline for the operating system.

What you're saying, though, is that you expect Perl to recognise \xA, \xD
or \xD\xA as line-ends on any system. Why? On Unix it's \xA, on Macs it's
\xD, and on Windows (theoretically, although I've seen evidence to the
contrary) it's the combo. To reiterate, I don't think Word _is_
"recognizing" anything in an intelligent way, although it may look like
it.

> Perl scripts on the PeeCee use the extension .plx and it's possible that if
> I had sent the file as a .plx instead of a .pl, AND if perl had been
> installed at the time, M$Outlook on the PeeCee would have fixed the
> linefeeds as the file was received. At least my girlfriend thinks so. Files
> sent as .txt have never exhibited the problem. I'll report when we have
> tried again.
> 
Only if those are the associations you have set up. The .plx extension si
a newer convention, supposed to indicate a script file as opposed to a
library (old-style).



===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org