Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Syntactic Confectionery Delight
 
PerlMonks  

Re: Stupid newbie question - perl/cgi

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

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


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
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.