Thread Elegante Syntax für Hash-Def
(11 answers)
Opened by bianca at 2010-03-27 12:41 2010-03-27T12:35:04 renee Extrem geil, Danke DIR vielmals! Meine Endlösung also folgende: Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 #!/usr/bin/perl -w use strict; use warnings; use Data::Dumper; my %tabelle; foreach (split m!$/!, <<KONSTANTE foo N foo2 X bar A KONSTANTE ) { my $counter = (keys %{$tabelle{head}}) + 1; ($tabelle{head}->{$counter},$tabelle{typ}->{$counter}) = split /\t+/,$_; } print Dumper(%tabelle); 10 print "Hallo"
20 goto 10 |