Well yes for a start you might strongly consider changing
toforeach my $line (<DATASOURCE>){
as the former has to build a list (thus requiring a large memory allocation) before it can start iterating. The latter will simply read and process the lines of the file one by one.while(my $line = <DATASOURCE>) {
/J\
In reply to Re: speeding up script that uses filehandles
by gellyfish
in thread speeding up script that uses filehandles
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |