when i open the script...it ALWAYS shows the script in the page .. why?!?! im just beginning in perl....thanx...:D
Printable View
when i open the script...it ALWAYS shows the script in the page .. why?!?! im just beginning in perl....thanx...:D
Are you runnin a webserver? If not then u need to be!
If you have a webserver then you need to make sure that:
you have a cgi-bin,
the cgi-bin is setup for perl scripts,
and the script is in the cgi-bin
if all of the above is done and it still doesn't work then post your code and ill take look at it for u
;)
you will also need the shebang line.
that is the line that is at the very top and looks somehting like this.
#!usr/bin/perl
that tells the browser where perl is located on the server.
also do like progressive says, your server has to support cgi.
Do you still need the shebang line under mod_perl? Since its not running under CGI, I don't see why you would need to tell the shell where the executable is, unless Apache uses it internally, maybe for the switches.
yes you still need it!!
What purpose does it serve then?
you had it right the first time, it tells apache where perl is.Quote:
Originally posted by JoshT
What purpose does it serve then?
But by using mod_perl, shouldn't apache have that loaded into memory and using that instead - rather than the executable like you would with cgi?
on apache it comes with a demo cgi script in perl. when i goto the address it says there was a internal server error. why?