Hi. Welcome to the community.
In my experience, this is
more of a rare error. It indicates corrupted data in the file, where a software did not write matching offsets in the IFD or maybe the file has become corrupted by other means.
If you have many of files with this problem, changes are that you have used one of the Picasa versions (or other "home" software) which corrupted metadata in files (in various ways), which is not ideal.
Users often recognize this kind of damage (Picasa is not the only software which damages metadata) after years, when they process their files in other software and the files don't load, are rejected or produce other issues. Like you did now by using IMatch and ExifTool.
I don't think that this error prevents ExifTool from updating the metadata in the file during a write-back. Not sure.
Did you check this?
You can see the actual metadata in your files in the ExifTool Command Processor (https://www.photools.com/help/imatch/et_command_processor.htm?dl=hid-1) with the "List Metadata" preset.
If the metadata you have entered or modified in IMatch shows in the file, all is well and no actions are needed.
Maybe run the IMatch Metadata Analyst (https://www.photools.com/help/imatch/app-md-analyst.htm?dl=hid-1) to check your files for other metadata problems you're unaware of.
What your Perl script does is (I guess) applying a series of commands which recreates EXIF metadata from scratch using ExifTool. Trying to salvage a file with corrupted EXIF data or maker notes. Which ExifTool can do, which is really nice.
I'm not sure about the full consequences of your process, though.
How deals this with existing legacy IPTC or XMP metadata in the file. Or maker notes. Is the data wiped? It not, probably tags which exist both in EXIF and XMP and legacy IPTC are out of sync afterwards (the Metadata Analyst will tell you).
Hard to tell from remote, because this is something that has to be checked for each affected file individually.
Tip: If you need to perform these steps often, you can add a preset file for the IMatch ExifTool Command Processor (https://www.photools.com/help/imatch/et_command_processor.htm?dl=hid-1) and then run it from the ECP or via a favorite as needed.
QuoteI would love to see this command built into iMatch. Something like Command> Repair Corrupted Metadata
Such a command does not exist, since what has to be done always depends on the individual damage in a file.
Sometimes less invasive methods like wiping and recreating all EXIF data do suffice, for example.
As I said, I think the error you see does not prevent IMatch from writing metadata and most users will never notice this kind of error, unless they keep the output panel open.