init a counter open the file and read it line by line split each line on space to get an array of the fvalue and svalue increment the counter if fvalue is within the range AND svalue is with +in the range close the file
It is really easy so I hope you will find it fun to convert the above into Perl.
Good luck.
update: You can even avoid the splitting in line 3 by using a simple regexp to get the fvalue and svalue. Might result in a possible speed increase, and will eliminate one spurious variable creation.
In reply to Re^2: headache with arrays.
by punkish
in thread headache with arrays.
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |