sub foo { my $key = shift; my %hash = @_; # und dann normal mit %hash als Hash arbeiten }