#!/usr/bin/perl use strict; use warnings; use 5.010; my %in_out = ( foo => 'bar', ); $in_out{foot}{bart} = sub { return "subsub"; }; my %test2 = ( insub => sub { my ($get2) = @_; # es existiert keine benannte Subroutine bart() in der Hash-Struktur # 'bart' ist ein Schlüssel innerhalb der Hash-Struktur; und eine Code-Referenz wird per ->() aufgelöst my $resp = $get2->{foot}->{bart}->(); say $resp; }, ); $test2{insub}->(\%in_out);