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
In reply to Re: matching a number
by tlm
in thread matching a number
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |