Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: appending a file

by arturo (Vicar)
on Sep 27, 2001 at 23:17 UTC ( [id://115214]=note: print w/replies, xml ) Need Help??


in reply to appending a file

Change: open(DATABASE, ">>/http01/cgi-bin/form/db/db.txt");

to something like :

open(DATABASE, ">>/http01/cgi-bin/form/db/db.txt") or die "Can't open +db.txt for append: $!\n";

That will give you an error message (as CubicSpline suggested, I'd bet it's that either your directory structure or permissions aren't set correctly). If this is a CGI script, you might want to put use CGI::Carp qw(fatalsToBrowser); at the top of your script (remove that line after the script goes into production, 'cos it could give valuable information to crackers). Adding that line will make sure you get to see the error message without poking around in the webserver's error logs.

Of course, that surmise is only correct for some values of "doesn't work." =)

HTH

perl -e 'print "How sweet does a rose smell? "; chomp ($n = <STDIN>); +$rose = "smells sweet to degree $n"; *other_name = *rose; print "$oth +er_name\n"'

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-25 23:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found