Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Stupid newbie question - perl/cgi

by BeernuT (Pilgrim)
on Apr 03, 2002 at 01:33 UTC ( [id://156198]=note: print w/replies, xml ) Need Help??


in reply to perl/cgi question: script works from unix command line, but not web page

Just a few pointers that will help you find the problem. The following will help you find errors in your code.
#!/usr/local/bin/perl -w use strict;
When opening files it is a good thing to check to see if they actually opened or not.
open(FH, "<file.txt") or die "Could not open file.txt: $!\n";
The webserver will most likely be running under a different user then yourself and will have to have access to the files your are opening and modifing.

Hope this helps.

-bn

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://156198]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-04-19 23:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found