This is really painful in Perl (perhaps made worse by a fading knowledge of PDL?).  Maybe you should move forward on the JSON-ing branch, where there is an intermediate (or maybe final) product that has everything starcheck knows about Obsids prior to actually running the ACA load checks.  Then put that out to a file and have the Python code do all the logic and return just a table of obsids and max CCD temperatures.

tl;dr - start farming out all code logic to Python.  This will actually give you a better understanding of how to set up the JSON data structures.