Hi!
Habe mal folgendes gemacht um evtl. undef Schlüssel oder Werte zu finden:
337 select STDOUT;
338 $|=1;
339 print "=====================================\n";
340 print "name:\t$name\n";
341 print "DNS_ntoa:\t$DNS_Data_ntoa{$name}\n";
342 print "Spectrum:\t$Spectrum_Data_ntoa{$name}\n";
343
344 if ( ($DNS_Data_ntoa{$name} eq $Spectrum_Data_ntoa{$name}) && \
Und als Meldung bekomme ich:
Use of uninitialized value in string eq at ./cstdd.pl line 344 (#1)
(W uninitialized) An undefined value was used as if it were already
defined. It was interpreted as a "" or a 0, but maybe it was a mistake.
To suppress this warning assign a defined value to your variables.
To help you figure out what was undefined, perl tells you what operation
you used the undefined value in. Note, however, that perl optimizes your
program and the operation displayed in the warning may not necessarily
appear literally in your program. For example, "that $foo" is
usually optimized into "that " . $foo, and the warning will refer to
the concatenation (.) operator, even though there is no . in your
program.
---
Ich kotz ins Essen! Das kann doch nicht sein! So wie ich das sehe ist doch nun absolut sicher gestellt das alle Werte definiert sind. Sonst hätte perl doch eine Meldung für die Zeile 340 || 341 || 342 ausspucken müssen. Trotzdem soll einer der Werte im if .. x eq y undef sein. Ich weiß echt nicht mehr weiter..
Die Ausgabe habe ich auch überprüft. In allen Feldern steht etwas drin, nichts ist leer und mittendrin dann eben die Meldung...
Eure Tipps waren bis jetzt ziemlich gut, habt ihr noch mehr davon? Ich habe keine Ahnung was ich hier noch machen soll...