Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Any help on speed improvement would be greatly appreciated!#!/usr/bin/perl use strict; use warnings; #text file about 70MB my $datasource ="C:\\somelargetextfile.txt"; my $i=1; open DATASOURCE, "$datasource" or die "Can't open $datasource: $!"; foreach my $line (<DATASOURCE>){ print "$i - $line"; $i++; } close (DATASOURCE);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: speeding up script that uses filehandles
by Yendor (Pilgrim) on Dec 02, 2004 at 17:06 UTC | |
|
Re: speeding up script that uses filehandles
by gellyfish (Monsignor) on Dec 02, 2004 at 17:06 UTC | |
|
Re: speeding up script that uses filehandles
by duff (Parson) on Dec 02, 2004 at 17:12 UTC | |
|
Re: speeding up script that uses filehandles
by hsinclai (Deacon) on Dec 02, 2004 at 17:30 UTC | |
by revdiablo (Prior) on Dec 02, 2004 at 19:14 UTC | |
|
slurp first?
by perrin (Chancellor) on Dec 02, 2004 at 18:33 UTC |