Thread Hash Element als Schleifenzähler
(6 answers)
Opened by bianca at 2011-05-25 16:56
Hab jetzt einfach Zeile 12 eingeschoben:
Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 #!/usr/bin/perl -w use strict; use warnings; my %foo = ( test => { alpha => 'beta', gamma => 'delta', }, ); foreach my $nr (keys %{$foo{test}}) { $foo{zaehler} = $nr; test (\%foo); } sub test { my ($bar) = @_; print "habe " . $bar -> {zaehler} . "\n"; } 10 print "Hallo"
20 goto 10 |