Thread Hashreferenz nach Anzahl Array Elemente
(4 answers)
Opened by Gast at 2007-11-13 15:31
Suchst du so was in der Art?
Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 #!/usr/bin/perl use strict; use warnings; use Data::Dumper; my $path = '100/101/102/103'; my $name = 'Hundertdrei'; my %tree; my $ref = \%tree; for my $dir ( split qr~/~, $path ) { $ref->{$dir} = {} unless exists $ref->{$dir}; $ref = $ref->{$dir}; } $ref->{NAME} = $name; $ref->{id} = $path; print Dumper \%tree; $_=unpack"B*",~pack"H*",$_ and y&1|0& |#&&print"$_\n"for@.=qw BFA2F7C39139F45F78
0A28104594444504400 0A2F107D54447DE7800 0A2110453444450500 73CF1045138445F4800 0 F3EF2044E3D17DE 8A08A0451412411 F3CF207DF41C79E 820A20451412414 83E93C4513D17D2B |