Thread Doppelter Hash - Problem... Hilfe ! (3 answers)
Opened by Tina at 2009-07-10 12:11

Gast Tina
 2009-07-10 12:11
#123040 #123040
Hallo,

folgendes Problem... Ich will einen doppelten hash... Wenn ich dann
aber zB ein Feld des 2. hash abfragen will, ob was drinne steht, wird
der 1. hash wert auf einmal gesetzt, wo ich doch
nur eine Abfrage mache ? Warum ist in dem Beispiel unten dann

a nicht drinne hallo
c drinne hallo

also "c drinne" und warum nicht weiterhin "c nicht drinne" ????

--8<-----------------
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#! /opt/bin/perl

my $login="hallo";
my %ALL={};

if ($ALL{$login})
{
    print "a drinne $login\n";
}
else
{
    print "a nicht drinne $login\n";
}

if ($ALL{$login}{"aktiviert"} ne "")
{
    print "";
}
            
if ($ALL{$login})
{
    print "c drinne $login\n";
}
else
{
    print "c nicht drinne - $login\n";
}

--8<-----------------
Last edited: 2009-07-10 12:26:01 +0200 (CEST)

View full thread Doppelter Hash - Problem... Hilfe !