12345678910111213
#!/usr/bin/perluse warnings; use strict;my %myhash; my $var; # <- $var soll global sein!$myhash{'foo'} = "bar";foreach $var (keys %myhash) { &mysub;}sub mysub { print "$var\n"; # <-- Wieso undef?}