=========== code extract ========== $file_seek_calendario_pago[0] = tell $LoanPaymentCalendarFileHandle; } # did not find an account match with the loan payment calendar. But were we in a block of "found accounts"? elsif ( $found_calendario_pago[0] == 1){ if ( $printoutput[0] == 1 ) { print @found_calendario_pago . "\n"; print "did not find??? \n"; } # go back to the previous line seek $LoanPaymentCalendarFileHandle, -$file_seek_calendario_pago[0], 1; ========= code extract ========= $file_seek_tran_prestamo[0] = tell $LoanTransactionFileHandle; } # account not found to go back a line elsif ( $found_trans[0] == 1){ # reset flag to not found for next account in control file $found_trans[0]= 0; # go back a line, leave filehandle in same position seek $LoanTransactionFileHandle, -$file_seek_tran_prestamo[0], 1; # get out of loop last;