Women in Technology

Hear us Roar



Article:
  Apache Web-Serving with Mac OS X: Part 2
Subject:   ^M Problem Has A Simple Solution or Not?
Date:   2002-10-11 06:30:48
From:   anonymous2
I developed hundreds of Perl scripts on my old Mac, but I always did it online. ALong comes OS X, which in theory should make offline Perl dev. simple for a novice like me. But when Macintosh Apache sees a Mac developed Perl script (SimpleText), it croaks because it sees ^M instead of a carriage return.


So I opened a test file in PICO, and one by one replaced each ^M with a unix carriage return... and poof... the script works. So now I'm searching for a simple way to convert my old SimpleText Perl scripts into Mac OS X Perl compatable ones. TextEdit will save a PICO written file in the write format, but saves SImpleText files with the ^M, and there is no toggle that I can find to tell it to get rid of the ^M and give me a mac unix version. This is frustration because I can't find a replace all command in PICO.


1) why does my unix virtual server that I pay $84 a month for read my old mac written Perl scripts without a hitch,


2) What do I have to do to convert my old Perl scripts so that Mac OS X Perl can read them???????


Jim

Full Threads Oldest First

Showing messages 1 through 2 of 2.

  • ^M Problem Has A Simple Solution or Not?
    2002-11-28 07:09:24  yyyyy [View]

    hi Jim

    use bbedit. open your cgi file change the mod to unix save it. It should work now.

    kutluhan
    • Macintosh line returns in scripts (^M)
      2003-02-17 11:00:04  kenv [View]

      I happened to open my perlscript in vi and saw numerous ^M. I said to myself that must be the problem. So then I came here and saw this article. I changed my preferences in BBedit to UNIX line returns and Whala everything works fine. I couldn't figure it out for the longest time. Thanks