You are looping over @ECL_STAT 2*1200 times! Loop over it once, storing the data in a structure that is efficient to look up by $NETID:
for( @ECL_STAT ) { my( $NETID )= split /\|/, $_; push @{$byID{$NETID}}, $_; }
Then you can do your calculations on that.
Update: Change 4 to 2. Thanks to arturo for the sharp eyes.
- tye (but my friends call me "Tye")In reply to (tye)Re: Grep Effeciency
by tye
in thread Grep Effeciency
by ImpalaSS
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |