open(my $fh, '<', $file) or die "error opening '$file': $!"; #### if ($x > 5 && $y < 10) ...