Roboticus@Roboticus-PC ~ $ cat ret.pl #!/usr/bin/perl my ($x, $y) = foo(); print "x=$x, y=$y\n"; sub foo { return 3, 5 } Roboticus@Roboticus-PC ~ $ perl ret.pl x=3, y=5