sub somesub { my $x = 1; my $y = 2; return ($x,$y); } my ($r1,$r2) = somesub(); print "r1: $r1, r2: $r2\n"; __END__ r1: 1, r2: 2