open(my $CDA1, '<', 'cda1_raw.txt') || croak "Cannot open input file 1: $!\n"; open(my $CDA2, '<', 'cda2_raw.txt') || croak "Cannot open input file 2: $!\n"; report_one($CDA1, 'cda1_boffle.txt'); report_one($CDA2, 'cda2_boffle.txt'); report_two($CDA1, $CDA2, $dbh); close $CDA1; close $CDA2;