use strict; use warnings; my ($x, $y, $z) = @{returner()}; sub returner { my ($a, $b, $c) =( undef, undef, undef); # define $a $b and $c # now we return one value only return [$a, $b, $c]; }