Thread hash of hashes (3 answers)
Opened by tribbiani at 2006-04-19 20:48

Ronnie
 2006-04-19 22:02
#65076 #65076
User since
2003-08-14
2022 Artikel
BenutzerIn
[default_avatar]
Ja, wobei du strict und warnings verwenden solltest. Das Modul Data::Dumper erlaubt dir entsprechede Konstrukte auch auszugeben, so das du siehst was du da baust.
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/perl

use strict;
use warnings;

use Data::Dumper;

my %hoh = ( sectionA => { 1 => 'K1A', 2 => 'K2A' },
sectionB => { K1A => 'v1A', K2A => 'v2A' } );

print $hoh{sectionA}->{1}, "\t", $hoh{sectionB}->{K1A}, "\n";

die Dumper \%hoh;

View full thread hash of hashes