Thread Elegante Syntax für Hash-Def (11 answers)
Opened by bianca at 2010-03-27 12:41

esskar
 2010-03-27 12:51
#135348 #135348
User since
2003-08-04
7321 Artikel
ModeratorIn

user image
wie benutzt du hash-of-hash und nicht hash-of-array?

also so
Code (perl): (dl )
1
2
3
4
5
6
7
8
#!/usr/bin/perl -w
use strict;
use warnings;
use Data::Dumper;
my %tabelle;
push @{ $tabelle{head} }, 'foo', 'bar';
push @{ $tabelle{typ} }, 'N', 'A';
print Dumper(%tabelle);


bzw

Code (perl): (dl )
1
2
3
4
5
6
7
8
9
#!/usr/bin/perl -w
use strict;
use warnings;
use Data::Dumper;
my %tabelle = (
        head => [qw/foo bar/],
        typ => [qw/N A/]
);
print Dumper(%tabelle);

View full thread Elegante Syntax für Hash-Def