I am not going to get into the details of this, but just a couple of quick stylistic comments:
- instead of including anonymous subs in your hashes, why don't you name them? Instead of row => sub { # complex code here that ASAIK creates a record }, write row => \&create_record, and then define create_record a little further. This way you're giving a name to that sub, and it becomes easier to see the data structure, without the big, often irrelevant, blob of code right in there.
- $$flight{Reg}; can be written $flight->{Reg};, which is especially handy when writing $cols->[0]</<c> instead of <c>@{$cols}[0]
- the commented-out code does not belong in there, if you have to remove code just do it, the source-control system will keep the old version.