Helpful Information
 
 
Category: Beginner Programming
Perl Help (really beginner stuffs)

I am starting to learn perl, and I wrote a program to grap some data (stock values) off some website. It works fine in Unix Command line, but I can't get it to display on the browser. now I understand that I have to put the script in a directory named 'cgi-bin', and I did that, but I still can't get access to it. Can someone help me out?

I am using phpwebhosting.com BTW, so if anyone using their service can help me out too...

Thanks in advance....

>>but I can't get it to display on the browser
You need to add this line ->
print "Content-type: text/htmlnn";
to display the output to browser

To grab without storing, start here -> http://www.devshed.com/Talk/Forums/Forum6/HTML/000182.html

To grab with storing, start here -> http://www.devshed.com/Talk/Forums/Forum6/HTML/000136.html

I assume you are using GET method, if you need to use POST method, you then need to use UserAgent.pm.

I don't know if you're running the public html from a unix box, but if you are, check your permission settings by doing 'll' at the command line, and make sure it is executable to the public. it needs to look like this:

progname.pl -rwxr-xr-x

if your setting are not like this, try changing the permission:

chmod a-r-w-x progname.pl <enter>
chmod u=rwx g=rx o=rx progname.pl<enter>

If this doesn't work, then you are calling the script wrong from your html code.










privacy (GDPR)