Thread Hash Element als Schleifenzähler (6 answers)
Opened by bianca at 2011-05-25 16:56

Taulmarill
 2011-05-25 17:20
#149170 #149170
User since
2004-02-19
1750 Artikel
BenutzerIn

user image
2011-05-25T15:16:32 bianca
Hab jetzt einfach Zeile 12 eingeschoben

Und dabei hatte ich gerade so eine schöne Lösung gefunden:
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use strict;
use warnings;

my %foo = (
    test    => {
        alpha   => 'beta',
        gamma   => 'delta',
    },
);
while ( ( $foo{zaehler}, undef ) = each %{$foo{test}} ) {
    test (\%foo);
}
sub test {
    my ($bar) = @_;
    print "habe " . $bar -> {zaehler} . "\n";
}
$_=unpack"B*",~pack"H*",$_ and y&1|0& |#&&print"$_\n"for@.=qw BFA2F7C39139F45F78
0A28104594444504400 0A2F107D54447DE7800 0A2110453444450500 73CF1045138445F4800 0
F3EF2044E3D17DE 8A08A0451412411 F3CF207DF41C79E 820A20451412414 83E93C4513D17D2B

View full thread Hash Element als Schleifenzähler