in reply to matching a number
Why not just simple arithmetic for this?
while ( <FH> ) { chomp; if ( abs( $input - $_ ) <= 0.1 ) { print "Value in list\n"; last; } }
Update: The original version of the above was overly complicated. I simplified it significantly, though the basic idea is the same.
the lowliest monk
|
|---|