List Info

Thread: Re: #! line on Mac




Re: #! line on Mac
country flaguser name
United States
2007-04-25 22:44:46

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:

#!/usr/bin/perl

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

John

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:
>
>#!C:Perlbinperl.exe
>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.
>
>;Thanks,
>Dean
>
>

--
John Francini, francini%40mac.com">francinimac.com

"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]

__._,_.___
.

__,_._,___
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )