Perl open file problem

Posted by alexBrand on Stack Overflow See other posts from Stack Overflow or by alexBrand
Published on 2010-04-12T15:10:13Z Indexed on 2010/04/12 15:13 UTC
Read the original article Hit count: 320

Filed under:
|

I am having some trouble trying to print from a file. Any ideas? Thanks

open(STDOUT,">/home/int420_101a05/shttpd/htdocs/receipt.html"); 
print "alex"; 
close(STDOUT);

open(INF,"/home/int420_101a05/shttpd/htdocs/receipt.html"); $emailBody = <INF>; 
close(INF); 
print $emailBody;

ERRORS: Filehandle STDOUT reopened as INF only for input at ./test.c line 6. 
print() on closed filehandle STDOUT at ./test.c line 9.

© Stack Overflow or respective owner

Related posts about perl

Related posts about cgi