Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] #! line on Mac

Expand Messages
  • John Francini
    Perl on a Mac (assuming you re running Mac OS X) is essentially like running Perl on its native habitat -- that is, UNIX. The magic cookie for Perl on a
    Message 1 of 3 , Apr 25, 2007
    • 0 Attachment
      Perl on a Mac (assuming you're running Mac OS X) is essentially like
      running Perl on its 'native' habitat -- that is, UNIX.

      The "magic cookie" for Perl on a Mac is like it is on most other UNIX
      systems. That is:


      What version of Mac OS X are you running? My 10.4.9 system has Perl
      5.8.6 installed.


      At 2:50 +0000 4/26/07, shrdlu2002 wrote:
      >I've written a couple of dozen Perl scripts and run them in Windows,
      >and occasionally as CGI. Now I'm trying to do the same in a Terminal
      >window on a Mac using OS X.2 (panther), and I'm stuck.
      >In Windows 95, 98, and XP, this is how I start:
      >use CGI qw(:standard) ;
      >print header();
      >#use strict;
      >use warnings;
      ># Create a user agent object
      >use LWP::UserAgent;
      >my $ua = LWP::UserAgent->new;
      >$ua->agent("Mozilla/5.0 (PPC Mac OS X; )");
      >I have at least two problems:
      >1) I don't know the correct path for the first line, or how to find
      >where perl is to be found (my guess is there's no .exe on the Mac). I
      >thought in installed perl 5.8, but "perl -v" still says 5.6. There is
      >a perl-5.8.1 folder on my desktop, but I don't know how to translate
      >that into a Unix-style path, or even if I should be trying.
      >2) Sometimes I can get execution started, but it can't find
      >UserAgent.pl , which makes me think I'm missing a library. (I probably
      >don't have the right Mozilla string, but execution isn't getting that far.
      >I'll appreciate any answers, or even semi-educated guesses.

      John Francini, francini@...

      "The journey is more important than the destination -- that's part of life.
      If you only live for getting to the end, you're almost always disappointed."
      -- Donald Knuth

      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.