while (<>) { next if ( $_ !~ /\d/ ); # Skip records w/o numeric fields # Match, print if within range here.. }