View Single Post
Old 09-04-2006, 12:22 AM   #1 (permalink)
dominicanpapi82
 
Newb Techie

Join Date: Apr 2005

Posts: 5

dominicanpapi82

Default Speeding up code

I know these forums aren't for code optimization, but this one is so short that I thought someone might be able to help me quickly.

I'm writing the following cgi program, 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);

dominicanpapi82 is offline