foo($pflicht1, $pflicht2, { opt1 => 123, opt3 => 456}); Sub foo { my $pflicht1 = shift; my $pflicht2 = shift; my $opt = shift; # hashref }