Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > running scripts

running scripts
Thread Tools
Mac Enthusiast
Join Date: Jun 2000
Location: New York, NY
Status: Offline
Reply With Quote
Apr 12, 2002, 12:09 PM
 
Hi,
I would like to have a family web site on my old imac running osx. there won't be a lot of traffic so no need for a new computer.

I am a computer programmer, but only program in C++ and Java.

I would like to have some perl scripts on my website to make it a bit more interactive.

I have changed permissions on the scripts so that i can see there output thru a web brower by typing something like this: http://localhost/path_to whereever/cgi-bin/my_perl_script.pl

This works great! However I once saw a page where I could put a tag in the html code that would call the perl script and replace the tag with the output of the script. This is what I want to do, but can't remember what I should put in the html.

I also see on this page that the url is followed by a "?" the a bunch of data=value strings. how do i pass these into the perl script?

thanks for your help.

Poul
12" Aluminum Powerbook
1.5Ghz G4 | 512Mb Ram | GeForce FX Go5200
     
Mac Elite
Join Date: Oct 1999
Location: San Jose, Ca
Status: Offline
Reply With Quote
Apr 13, 2002, 06:44 PM
 
First off, if you want to embed the results from a script inside html there are two ways of doing it: using a server side include where the server "includes" the information in the file it gives to the client, and using frames or iframes (or layers for older versions of netscape). The former is what you almost definitely want. Here is a link the the Apache manual page on it:

http://httpd.apache.org/docs/howto/ssi.html

As to using form data, that you can do in a number of ways, but the easiest would be to use CGI.pm. I think that the module is included with the standard install of MacOS X, but am not sure anymore. In any case the manual is in the download with is avalible here:

http://cpan.org/authors/id/L/LD/LDS/CGI.pm-2.77.tar.gz

Quick couple pieces of advice:

Buy O'Reilly's "Learning Perl" it is the classic book. Buy lots of O'Reilly books!

Learn PHP. The manual is avalible on their site at: http://php.apache.org
     
poulh  (op)
Mac Enthusiast
Join Date: Jun 2000
Location: New York, NY
Status: Offline
Reply With Quote
Apr 14, 2002, 03:33 PM
 
Thanks larkost, this is exactly what i needed!
12" Aluminum Powerbook
1.5Ghz G4 | 512Mb Ram | GeForce FX Go5200
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:46 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2