The script remove_items_from_biblioitems.pl needed for upgrading from Koha 3.2 to 3.4 doesn't handle errors properly, and when there's a badly corrupted record, it prints the following message and dies: Undefined subroutine &MARC::Record::carp called at /usr/share/perl5/MARC/Record.pm line 565. At the very least, remove_items_from_biblioitems.pl should print a useful error message, and ideally it should handle the error, rather than dying mid-way through.
This looks like an issue with MARC::Record, not necessarily remove_items_from_biblioitems.pl. I see this line in MARC::Record 2.0.2 and possible 2.0.3 remove_items_from_biblioitems.pl has an error handling method built in to report any biblionumber that fails to parse, but it looks like this undefined subroutine error is preventing the code from reaching that point of error reporting.
Marking this bug invalid based on Ian's comment.