6 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/perl
use 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?
}
subroutine($variable);
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#!/usr/bin/perl use strict; use warnings; my %myhash; my $var = "qiz"; # <- $var soll global sein! $myhash{'foo'} = "bar"; foreach $var (keys %myhash) { print $var; mysub(); } sub mysub { print "$var\n"; # <-- Wieso undef? }
6 Einträge, 1 Seite |