with a hash (e.g. %Nets) containing the above values andif (($TotalNets == 50000) || ($TotalNets == 100000) || ($Total +Nets == 250000) || ($TotalNets == 500000) || ($TotalNets == 1000000) +|| ($TotalNets == 1500000) || ($TotalNets == 2000000) || ($TotalNets +== 3000000)) {
I like pc88mxer suggestion, but I notice that (for example) 150,000 is not in your test, so modulo 50,000 would give you a false positive.if ( $Nets{$TotalNets) ) {
Another suggestion would be to replace
with$_ =~ s/^ *//; $_ =~ s/ *$//; @DriverLine = split (/\s+/,$_);
@DriverLine = split( /\s+/, (( /^\s*(\S.*)\s*$/ ) ? $1 : $_ ) );
The code hasn't been tested, and I can't swear to the efficiencies.
In reply to Re: Looking for ways to speed up the parsing of a file...
by apl
in thread Looking for ways to speed up the parsing of a file...
by fiddler42
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |