|
|
Perl?
|
|
|
|
Junior Member
Join Date: Oct 2002
Status:
Offline
|
|
I need to run Perl on OS X. Is this possible somehow?
|
|
|
|
|
|
|
|
|
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status:
Offline
|
|
it's already running, when you boot the machine up
|
"Have sharp knives. Be creative. Cook to music" ~ maxelson
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Mar 2003
Location: UK
Status:
Offline
|
|
Doesn't a version come with it?
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Oct 2002
Status:
Offline
|
|
Originally posted by philzilla:
it's already running, when you boot the machine up
So what do I have to do?
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Nov 1999
Status:
Offline
|
|
Um... it's Perl. Granted, it's the command-line version (though you can also get a Carbon version from the Web and Cocoa bindings are in the works). But it works basically the same as it does everywhere else.
|
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
|
|
|
|
|
|
|
|
Mac Elite
Join Date: May 2002
Status:
Offline
|
|
In other words,
a) Write a perl script
b) Run it with, for example, "./scriptname" or "perl script.pl"
|
[vash:~] banana% killall killall
Terminated
|
|
|
|
|
|
|
|
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status:
Offline
|
|
Originally posted by manfreds:
So what do I have to do?
apply your finger to the Power button
|
"Have sharp knives. Be creative. Cook to music" ~ maxelson
|
|
|
|
|
|
|
|
Junior Member
Join Date: Oct 2002
Status:
Offline
|
|
Originally posted by Gul Banana:
In other words,
a) Write a perl script
b) Run it with, for example, "./scriptname" or "perl script.pl"
Thanks. Unfortunately it doesn't do anything. If I type perl xxxx.pl nothing happens, not even an error message. Where does the output go?
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Jun 2001
Location: Massachusetts, USA
Status:
Offline
|
|
Well, assuming you put some print statements in there somewhere, it should go to standard output... if you want to make sure you're getting the right interpreter, type:
which perl
And then use the path that's generated by that as the first line of your script:
#!/usr/bin/perl -w
(In my opinion, you should always use the -w flag -- it enables warnings and debuggings and things of that nature that may very well not be reported otherwise. In fact, an error of that sort might be why your script isn't working.)
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Oct 2002
Status:
Offline
|
|
Thanks, Phoenix!
It turned out it were the Macintosh line breaks. It appears to work with Unix line breaks only.
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Oct 2002
Status:
Offline
|
|
Allow me another question please: I'm supposed to do chmod 755 on the file and put it into a cgi-bin directory. I made a cgi-bin folder in my Web-Sites folder, but Safari doesn't execute the script. It just loads it as text.
Where is this cgi-bin folder so that Safari can execute the script?
------
Never mind. I found it. The script belongs into Library/WebServer/CGI-Executables
(
Last edited by manfreds; Apr 27, 2003 at 03:48 PM.
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|