open $fh, '<', $file or die $!; process($fh) if is_valid($fh);