my $options = parse_cmd_args(); my $patient_file = open_patient_file( $options ); my $result_file = open_result_file( $options ); while ( my @record_lines = get_record( $patient_file ) ) { my $record_hash = parse_record( @record_lines ); output_results( $result_file, $record_hash ); }