alexsc01 has asked for the wisdom of the Perl Monks concerning the following question:
I have about 20 of these matching lines of code. At first I had the matching lines inside the while loop. Opening a document took about 30 secs, now with it on the outside it takes about 5 secs. Is there a better way to do this? Scottopen(RTF_FILE, "file"); while(<RTF_FILE>){ $document.=$_; } $document =~ s/SURNAME/$surname/ ; .... .... print $document ;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Matching data in a big file
by hdb (Monsignor) on Dec 14, 2013 at 10:07 UTC | |
by roboticus (Chancellor) on Dec 14, 2013 at 16:57 UTC | |
by hdb (Monsignor) on Dec 14, 2013 at 18:25 UTC | |
by Anonymous Monk on Dec 14, 2013 at 13:36 UTC | |
|
Re: Matching data in a big file
by CountZero (Bishop) on Dec 14, 2013 at 12:23 UTC |