in reply to Re: matching a number
in thread matching a number

Minor tweak to make sure the $1 is used IFF the regex succeeds:
while(<F>){ next unless /(\d+\.\d+)/ && abs($1 - 5.56)<=.1; print $1,"\n"; }