in reply to Subroutines and Passing data ...

You can return more values by passing them out in an array, so you were on the right track:
sub test { .... return ($mes1,$mes2); } @array = test; -or- ($val1,$val2) = test;

.:| If it can't be fixed .. Don't break it |:.