Thread Speichern von Daten aus array in Hash: %hash und @array/aref
(6 answers)
Opened by Duff at 2007-05-25 16:48
[quote=PerlProfi,25.05.2007, 17:34]Ansonsten kriegst du einen Fehler, falls die Values von deinem Hash keine Arrayreferenzen enthalten, wenn du den push() machst.[/quote]
das stimmt so nicht. ist ein hash-value undef, dann erstellt perl das array on-the-fly, wenn man ein push macht. siehe Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: ![]() ![]() |