Thread 2 array Fragen. (47 answers)
Opened by galaxy at 2006-04-13 12:27

shaihulud
 2006-04-21 13:31
#64878 #64878
User since
2006-04-12
76 Artikel
BenutzerIn
[default_avatar]
verdammt nochmal ich krieg das mit den keys nicht hin...

Code: (dl )
1
2
      $hash{$header} = $inhalt;
push(@array,\%hash);


wie muss ich die foreach-schleife schreiben um die $header auszulesen? der code vom dubu macht mich ganz quirre..

Code: (dl )
1
2
3
4
5
6
foreach my $ele (@array) {
print "$ele\n";
for my $key ( keys($ele) ) {
print "$ele{$key}\n";
}
}

Type of arg 1 to keys must be hash (not private variable) at functions.pm line 61, near "$ele) "
Global symbol "%ele" requires explicit package name at functions.pm line 62.
Execution of functions.pm aborted due to compilation errors.

Edit Relais: Code-Tags spendiert. Zeilenumbruch repariert.\n\n

<!--EDIT|Relais|1145616763-->

View full thread 2 array Fragen.