in reply to subroutine passing array as named parameter

So you're passing a hash by reference, and one of its elements has key "record", and its corresponding value is an array reference.

You need to deal with the array reference in the sub. That is,

$args->{record}
is a reference, so you need to do
my @record = @{ $args->{record} };

We're building the house of the future together.