Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re: MacPerl lies -

by chipmunk (Parson)
on Nov 20, 2001 at 09:36 UTC ( #126475=note: print w/replies, xml ) Need Help??

in reply to MacPerl lies -

Your module file has Unix newlines (line feed) rather than Macintosh newlines (carriage return). This causes Perl to see the entire file as a single line, most of which is probably a really long comment.

If you transferred the file from a Unix machine via FTP, you will want to make sure to use text mode.

On your Mac, you can fix the newlines with BBEdit, or create a MacPerl droplet like the following to translate the newlines:

#!perl -pi tr/\r/\n/;
(Remember that in MacPerl, \r and \n are reversed, so that \n still corresponds to the local newline character.)

Replies are listed 'Best First'.
Re: Re: MacPerl lies -
by amelinda (Friar) on Nov 20, 2001 at 22:10 UTC
    <insert vociferous cursing here>

    Yes. Actually they were just fine until I changed the newlines in vi (this runs on a server that's OS X, but the clients are OS 9) so that I could actually read the files. I changed them back (in both that module and in the .plx), and now they are happy again.

    :sigh: The more I have to deal with them, the more annoyed I am by these Macs.

      I think you should mean "the more you don't know what you are doing, the more you are annoyed with yourself."

      Read man perlport. It contains all you need to know about writing portable perl, including information on newlines.

      And yes, I am being unnecessarily harsh, but only because I am bored. Don't take it personally.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://126475]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2020-01-23 13:19 GMT
Find Nodes?
    Voting Booth?