use strict; use warnings; my @array = qw( a b c d e ); sub test { return @array; } sub test2(@) { print(scalar @{$_[0]}, "\n"); } test2(test()); __END__ Can't use string ("a") as an ARRAY ref while "strict refs" in use at script.pl line 11.