That is because you are *not* printing "Browser Test" to the OUTFILE handle.

open(OUTFILE, ">>survey.txt");
print OUTFILE "this is a test!!!\n";
print OUTFILE "<html>Browser test</html>\n";
close(OUTFILE);



-----Original Message-----
From: Elliot Holden [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 03, 2005 11:55 AM
To: beginners@perl.org
Subject: file input/output


okay this may seem like a simple problem but here it goes:
when running the the script below from the unix (mac osx) command line
the "survey.txt" file is created and "this a test!!!" is written to the
file. But when running it from a browser the file is Not created and
"Browser test" is displayed in the browser. So in essennce when running
from a browser the file creation section of the script is being skipped
over. Please, please, please, why is this happening, somebody? I've
tried it on diffferent browsers - Mozilla, IE.


open(OUTFILE, ">>survey.txt");
print OUTFILE "this is a test!!!\n";
close(OUTFILE);
print "<html>Browser test</html>\n";

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>



The contents of this E-mail (including the contents of the enclosure(s) or 
attachment(s) if any) are privileged and confidential material of MBT and 
should not be disclosed to, used by or copied in any manner by anyone other 
than the intended addressee(s).   In case you are not the desired addressee, 
you should delete this message and/or re-direct it to the sender.  The views 
expressed in this E-mail message (including the enclosure(s) or attachment(s) 
if any) are those of the individual sender, except where the sender expressly, 
and with authority, states them to be the views of MBT.
This e-mail message including attachment/(s), if any, is believed to be free of 
any virus.  However, it is the responsibility of the recipient to ensure that 
it is virus free and MBT is not responsible for any loss or damage arising in 
any way from its use.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to