Do not, however, be tempted to do this: (@a, @b) = upcase(@list1, @list2); Like the flattened incoming parameter list, the return list is also flattened on return. So all you have managed to do here is stored everything in @a and made @b an empty list. See "Pass by Reference" for alternatives.