sub foo { return($scalar, $anotherscalar, @array) } my($s1, $s2, @a) = foo;