Is there a way to delineate the end of data block, something line __ENDOFDATA__ ( if it exists )?
I don't believe so, but I am more interested in knowing why you would want to. I used __DATA__ because I assumed you were getting the data to populate the array from an external file. In this case, you would only need to open a filehandle for that file and replace the <DATA> with <FILEHANDLE>. If my assumption is wrong, please clarify and I will try and help you accomplish what you want.
I was thinking more in terms of packing or caching the sort keys, but now I really don't think that's necessary. The file only contains about 400 lines
That's why I recommended using a different data structure (such as an AoH) if you could. You would not have to use the Schwartzian Transform and your data would be more easily accessible. The other side to this is it would consume more memory.