my ($scalar, $a_ref, $h_ref) = some_sub(42, \@foo, \%bar); sub some_sub { my $answer = shift; my ($foo, $bar) = @_; return ($answer, $foo, $bar); }