Hi there, 

I still got Problems with hashes.

I have the following code:

sub board_database{

my $sth = $dbh->prepare( "SELECT * FROM $table where serial=@_" ) ||
     die "Kann Statement nicht vorbereiten: $DBI::errstr\n";
$sth->execute ||
     die "Kann Abfrage nicht ausfuehren: $DBI::errstr\n";

while (my ($tstamp,$serial,@ergebnis) = $sth->fetchrow_array ){
        push @tstamp_board , $tstamp;
        push @serial , $serial;
        push @retests , $ergebnis[0];
        push @fwrev , $ergebnis[1];
        push @hwrev , $ergebnis[2];
        push @hp79k , $ergebnis[3];
        push @platz , $ergebnis[4];
        push @passfail , $ergebnis[5];
        push @fw , $ergebnis[6];
        push @sn , $ergebnis[7];
        push @mac , $ergebnis[8];
        push @rl1 , $ergebnis[9];
        push @rl2 , $ergebnis[10];
        push @rl3 , $ergebnis[11];
        push @rl4 , $ergebnis[12];
        push @lcl1 , $ergebnis[13];
        push @lcl2 , $ergebnis[14];
        push @lcl3 , $ergebnis[15];
        push @lcl4 , $ergebnis[16];
        push @bost , $ergebnis[17];
        push @lloop , $ergebnis[18];
        push @sloop , $ergebnis[19];
        push @psdh , $ergebnis[20];
        push @psdrxmt , $ergebnis[21];
        push @psdtxmt , $ergebnis[22];
        push @actusl , $ergebnis[23];
        push @actdsl , $ergebnis[24];
        push @actuss , $ergebnis[25];
        push @actdss , $ergebnis[26];
        push @mask , $ergebnis[27];
        push @pid , $ergebnis[28];
        push @qu24 , $ergebnis[29];
        push @qu25 , $ergebnis[30];

                #for debug Purpose...
                if ($debug){
                print "<LI>".$tstamp." ".$serial." ".$ergebnis[0]." ".$ergebnis[1]." 
".$ergebnis[2]." ".$ergebnis[3]." ".$ergebnis              [4]." ".$ergebnis[5]." 
".$ergebnis[6]." ".$ergebnis[7]." ".$ergebnis[8]." ".$ergebnis[9]." ".$ergebnis[10]." 
".                 $ergebnis[11]." ".$ergebnis[12]." ".$ergebnis[13]." 
".$ergebnis[14]." ".$ergebnis[15]." ".$ergebnis[16]." ".                    
$ergebnis[17]." ".$ergebnis[18]." ".$ergebnis[19]." ".$ergebnis[20]." 
".$ergebnis[21]." ".$ergebnis[22]." ".                    $ergebnis[23]." 
".$ergebnis[24]." ".$ergebnis[25]." ".$ergebnis[26]." ".$ergebnis[27]." 
".$ergebnis[28]." ".                    $ergebnis[29]." ".$ergebnis[30]. "\n";
                }
}
# Statement-Handle Resources freigeben
$sth->finish;
}

board_database($seriennr);

Later i Printed the Values like:

foreach $elem (@tstamp_board){print "$elem\n";}  etc

Now i want to call the Sub not onla once, but I donīt want to lose the previous 
Values, so I tried this in the sub:

 push @{$ergebnis{$seriennr}}, 
{tstamp=>@tstamp_board,serial=>@serial,retests=>@retests,fwrev=>@fwrev,hwrev=>@hwrev,hp79k=>@hp79k,platz=>@platz,passfail=>@passfail};

But if I try to read the Values from it:

my $erg= $ergebnis{$seriennr};

print $$erg->{passfail}[0];

I only get the Hash Adress...

Whats the Problem with this?

Thanks Joe

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to