$ perl -E ' use strict; use warnings; say ref \my $scalar; say ref \my @array; ' SCALAR ARRAY #### $ perl -E ' use strict; use warnings; say ref my \$scalar; say ref my \@array; ' The experimental declared_refs feature is not enabled at -e line 4. $ perl -E ' use strict; use warnings; use feature "declared_refs"; say ref my \$scalar; say ref my \@array; ' Declaring references is experimental at -e line 5. Declaring references is experimental at -e line 6. SCALAR ARRAY $ perl -E ' use strict; use warnings; use feature "declared_refs"; no warnings "experimental::declared_refs"; say ref my \$scalar; say ref my \@array; ' SCALAR ARRAY #### $ perl -E ' use strict; use warnings; use feature qw{refaliasing declared_refs}; no warnings qw{experimental::refaliasing experimental::declared_refs}; my ($sc, @ar) = qw{qwert asdfg zxcvb}; my \$scalar = \$sc; my \@array = \@ar; say $scalar; say "@array"; ' qwert asdfg zxcvb #### use feature qw{refaliasing declared_refs}; no warnings qw{experimental::refaliasing experimental::declared_refs}; #### use experimental qw{refaliasing declared_refs};