in reply to fastest way to compare numerical strings?
Just a quick note:
The take the abs value of the difference between the 2 numbers, check if that is greater than .01. That should read cleaner and get rid of most of those checks.
Also as a favor for the people trying to read your code - pick a style of indenting.
Update: fixed typo and minor edit#untested for ($n=0;$n<=$#lat;$n++) { for ($v=0;$v<=$#lat;$v++) { if ( abs( $lat[$n] - $lat[$v] ) < .01 and abs( $long[$n] - $l +ong[$v] ) < .01 ) { ##OTHER CODE } } }
grep
One dead unjugged rabbit fish later...
One dead unjugged rabbit fish later...
|
---|
In Section
Seekers of Perl Wisdom