I have gotten the site to work but my problem is, when I run the below code from my web browser, I do not see a file called "data.txt" in the same directory. When I execute this from the console, it works just fine. What am I doing wrong?? Is there anything else that I need to set?
Any help would be appreciated!
Expand|Select|Wrap|Line Numbers
- use strict;
- open (MYFILE, '>>data.txt');
- print MYFILE "this is a test\n";
- close (MYFILE);
- print "HTTP/1.0 200 OK\n";
- print "Content-Type: text/html\n\n\n";
- print <<html_end;
- <html>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-88959-1">
- </head>
- <body>
- <p>Writing to a file...complete</p>
- </body>
- </html>
- html_end