[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: perl + Konfigurationsdatei



Hallo,

Am Die, 30 Mär 2010, Kai Wilke schrieb:
>Hier mal die Ausgabe der "foreach" Schleife, mit dem Operator "eq".
>Abschnitt:
>
>if ($meine_daten{$key} eq undef) {

Das schreibt man normalerweise als

    if ( defined($meine_daten{$key}) ) {

AFAIR bedingt der Vergleich per 'eq' schon einen Zugriff und somit
auch eine "uninitialized" Meldung ...

>Use of uninitialized value in string ne at ./djb_update line 97.
>Use of uninitialized value in string ne at ./djb_update line 97.

Mind. eine(!) der Config-Variablen wird wohl nicht gesetzt.

Kannst du mal (ggfs. per PM) Script _und_ Config-Datei bei der das
Problem auftaucht mailen?

Achso: das mit/ohne Anführungszeichen in der Config-Datei kann man in
beiden Versionen (split/regex) auch noch erschlagen. Das wäre kein
Problem. Kommt drauf an, was du (erlauben) willst.

-dnh

-- 
If you don't see why, please stay the fuck away from my code.
                                      -- Paul "Rusty" Russel,
  in /usr/src/linux/Documentation/DocBook/kernel-locking.tmpl


Reply to: