sub process_record { my $array_ref = shift; my $record = join q[], @{$array_ref}; ...