Thread Satz in Array - Problem
(18 answers)
Opened by Luke at 2010-04-19 11:04
Hallo, ich mach jetzt nicht extra wieder ein Theard auf falls es wieder was ist wie vorhin. Ich brauch die Parameter count und error übergeben. Vllt findet ja jemand einen Fehler. Ist mit großer Wahrscheinlichkeit in dem Sub.
Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 sub read_data { my @curr = (); # aktueller Datensatz my %hash = (); while (<>) { # bricht bei EOF ab chomp; $count++; if ($_ ne '---'){ @curr = split(/\|/); $error=$curr[1]; $hash{$error} = $count; #$error=$curr[1]; } else {last;} } print %hash; print "\n"; return %hash; } Last edited: 2010-04-19 17:03:40 +0200 (CEST) |