I forgot to mention that you can use a continuation closure, something like this (untested):
my $test = sub { my $hr=shift; return $hr->{$var1}{$var2} }; foreach my $domain (sort {$a cmp $b} keys %{$hash}) { my $value = &{$test}($$hash{$domain}); }
...roboticus
Update: correction, as noted by chromatic. (I didn't make the other change, as it's merely ugly rather than wrong, and chromatic shows the nicer looking version anyway.)
In reply to Re^2: unblessed reference problem
by roboticus
in thread unblessed reference problem
by gdolph
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |