Make sure the web server is configured to run cgi scripts first. In apache's
httpd.conf, there will be lines that set this up, including:

AddHandler cgi-script .cgi

The .cgi extension tells the web server to treat this differently than a
normal document. Most people will usually just name the script with a .cgi
extension and be done with it, but you can also add a handler for .pl files.
Otherwise, it won't even consider executing the script, much less processing
the first line (#!/usr/bin/perl will still be needed to tell the server which
interpreter the script uses).

In other words, rename the file. And you might need to place your scripts in a
cgi-bin directory. This also depends on the web server's configuration.

I must add, that if you didn't already know this, try to be careful about
potential security holes in your script.

-Richard Hoelscher

Ece P wrote:

> > try:
> > $ perl filename.pl
>
> I had tried what you said but
> %perl filename.pl
> works to run the file in unix (which I get)
>
> but i couldn't get
> ccwf.cc.utexas.ed/~username/filename.pl
> to come up as it should
> --instead i get the raw code displayed on that webpage(I hope I'm making
> myself clear..)
>
> do I need to put my filename.pl in a cgi-bin??
> --sorry to bother you guys with this again
> thanks again,
> Ece
>
> P.S.
> > or if you have something like #!/usr/local/bin/perl as the first
> line of your
> > script and it's chmod'ed to be executable you can invoke it with just the
> > name.
> I have this...
>
> ---------------------------------------------------------------------------
> Send administrative requests to [EMAIL PROTECTED]

---------------------------------------------------------------------------
Send administrative requests to [EMAIL PROTECTED]

Reply via email to