#!/usr/bin/perl use strict; use warnings; while (my $line = <>) { if ($line =~ /(?:\d{2,}.\d|[5-9].\d|4.[1-9]) inches/) { } else { } }
5.4 inches 12.6 inches 1.2 inches 10.5 inches 4.0 inches
[> 4.0"]: 5.4 inches [> 4.0"]: 12.6 inches [<= 4.0"]: 1.2 inches [> 4.0"]: 10.5 inches [<= 4.0"]: 4.0 inches