CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: mod_perl:
File I/O Problem - Help Needed


New User

Aug 11, 2008, 2:18 AM

Post #1 of 2 (18187 views)
File I/O Problem - Help Needed Can't Post

Good day,
please i have a file input/output problem, while would this code be displaying a blank page.

here is my code;

sysopen (HTML, 'myhtml.html', O_RDWR|O_EXCL|O_CREAT, 0755) or die "$filepath cannot be opened."; 
printf HTML "<html>\n";
printf HTML "<head>\n";
printf HTML "<title>My Home Page</title>";
printf HTML "</head>\n";
printf HTML "<body>\n";
printf HTML "<p align='center'>This is a test paragraph.</p>";
printf HTML "</body>\n";
printf HTML "</html>\n";
close (HTML);


Feb 17, 2009, 4:50 PM

Post #2 of 2 (13522 views)
Re: [modpluz] File I/O Problem - Help Needed [In reply to] Can't Post

I tried your code using the Fcntl module and it works correctly. Maybe, you forgot to insert "use Fcntl;" on the top of your script.


Edit: Is not necessary the eXecution permission for a HTML file.

(This post was edited by gnix on Feb 17, 2009, 4:52 PM)


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives