in reply to Help understanding inherited script
This code reads the input file and splits the lines into variables using unpack. It prints out the variables using pack
# loop over all the records in the input file while ( $record = <INPUT_FILE> ) { chomp($record); $input_record_count++; for (substr($record, 0, 1) ) { if (/H/) { &H_header($record); } elsif (/C/) { &C_claim($record); } elsif (/P/) { &P_provider($record); } elsif (/D/) { &D_detail($record); } elsif (/M/) { &M_message($record); } } }# end-while
The code is commented like this
sub H_header { # unpack the record into local fields # Write the EOB record } sub D_detail { # parse the input record into different individual fields # write the detail service record } sub C_write_claims { foreach (@claim_recs) { # parse the input record into different fields # write the claim record } }
What are the changes you want to make ?
poj
|
|---|