Thread hashes und array verschachtelt (5 answers)
Opened by aedu at 2005-11-25 15:46

sesth
 2005-11-25 16:04
#60418 #60418
User since
2005-02-01
181 Artikel
BenutzerIn
[default_avatar]
Das sollte in etwa so gehen:
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use strict;

my %hash;
my $tag = 'coredump_dir';
my $default = 'none';
my $value = '/opt/lala/squid/var/cache';

$hash{$tag}{"default"} = [$default];
$hash{$tag}{"value"} = [$value];

foreach my $key (keys %hash){
    print $key . "\t";
    print $hash{$key}{"default"}[0] . "\t";
    print $hash{$key}{"value"}[0] . "\n";
}
Gruß
Thomas

View full thread hashes und array verschachtelt