getlists(\@a, \@b); print join(" ",@a),"\n",join(" ",@b); sub getlists { my ($foo, $bar) = @_; @$foo = (1,2,3); @$bar = (4,5,6); }