use strict; %hash -> here i have some hash my @array = qw(...); my $a = 1; foreach my $r (@array){ walk($r); @big;<----------------------------------- foreach my $b (@big){ | $a++; | print " I am $b that loves $a\n"; | } | } | | | sub walk { | | my $i = shift; | push @big, $i;------------------------------- for (@{$hash{$i}}){ walk($_) }