I\'m trying to port a library from Javascript to Perl, but having some issues detecting array arguments.
A stripped-down example (in Javascript) looks something like