in reply to Passing three arrays to a subroutine

A strategy that I like to use in such cases is to pass in one hashref that (must) contain the arrayrefs (or whatever) that I expect.

In my typical style, the subroutine aggressively checks its arguments.   If anything is not-quite-right, it uses Data::Dumper to dump the list, and then and either croaks, or confesses its sins. (Carp).