Thread Komplexe Datenstruktur in Perl aufbauen (29 answers)
Opened by Matthias at 2010-02-26 12:54

FIFO
 2010-02-26 20:03
#133751 #133751
User since
2005-06-01
469 Artikel
BenutzerIn

user image
2010-02-26T15:47:10 topeg
Code (perl): (dl )
1
2
3
4
my %Host_Records = (
        APP_RECORDS => \%APP,
        ERRORS => \@ERROR_LIST,
);


So sollte das richtiger Weise aussehen.


Nur so aus Erinnerung an leidvolle Erfahrung: Gerade wenn man noch nicht so firm in komplexen Datenstrukturen ist, nimmt man hier statt der Referenzen oft besser anonyme Hash-/Arraykopien:

Code (perl): (dl )
1
2
3
4
my %Host_Records = (
        APP_RECORDS => {%APP},
        ERRORS => [@ERROR_LIST],
);
Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it? -- Brian Kernighan: "The Elements of Programming Style"

View full thread Komplexe Datenstruktur in Perl aufbauen