#!/usr/bin/perl use v5.16; use warnings; my $a = ''; local our @str; sub {*str = \@_}->('Hello', $a); $a = 'Kevin'; say "@str";