#!/usr/bin/perl use strict; use warnings; use Data::Dumper; sub dofn { my %hashfn; my ($ivon, $ibis, $imal) = @_; for (my $i = $ivon; $i < $ibis; $i++) { push(@{$hashfn{'var1'}}, $i*$imal); push(@{$hashfn{'var2'}}, $i*$imal*10.); push(@{$hashfn{'var3'}}, $i*$imal*20.); } return \%hashfn; } my $hierhash_1 = dofn(0, 5, 1); # print "1 $hierhash_1->{'var2'}[3] \n"; push(my @hashfeld, $hierhash_1); my $hierhash_2 = dofn(0, 5, 2); # print "2 $hierhash_2->{'var2'}[3] \n"; push(@hashfeld, $hierhash_2); # print Dumper \@hashfeld; my $wert = $hashfeld[0]->{'var2'}[3]; print "$wert \n"; __END__ $ perl test.pl 30