use strict; use warnings; #!usr/bin/perl print "here I start \n"; do "Datei_mit_Subroutine.pl"; my %hash = %{dateilesen()}; print "here is the return value of dateilesen:\n"; foreach my$key (sort {$hash{$a}->[0] <=> $hash{$b}->[0]}keys %hash) { print "$key: "; foreach my $val (@{$hash{$key}}) { print "$val "; } print "\n"; } sub dateilesen { my %hash; $hash{h12} = [qw/121 122 123/]; $hash{h15} = [qw/151 152 153/]; \%hash; }