in reply to Re^2: Broken Function
in thread Broken Function

If you had not commented out your "or die "Could not open file: $!\n" code, then the reason why the file handle did not open would have been printed.