| Guest

100 Hedir Points
Guest's Home Page
 Author Feeds (Beta) |
Posted: Mon Sep 04, 2006 4:41 am Post subject: Speeding up code
|
|
|
|
I know not very many people post code in this forum, but since so many people at HEDir know about cgi I hoped someone here might be able to help me out.
I'm writing the following cgi script and was wondering if anyone could help me know if there is a faster/better way of doing this:
| Code: |
open(FH,"file1.txt") # OPEN file1.txt, ABOUT 50 LINES OF TEXT
while (my $line = <FH>) {
print $line; #PRINT ONE LINE AT A TIME
}
close(FH);
(INSERT INFO FROM A SHORT FORM HERE)
open(FI,"file2.txt") # OPEN file2.txt, ABOUT 600 LINES OF TEXT
while (my $line = <FI>) {
print $line; #PRINT ONE LINE AT A TIME
}
close(FI);
|
This form may be processed between 20 and 50 times per person, and it might get a couple of hundred to 1000 visitors, maybe more, per day. I expect hypershort attention spans too. I'd like to be able to keep visitors coming back. |
|