sub test { .... return ($mes1,$mes2); } @array = test; -or- ($val1,$val2) = test;