[Vienna-pm] Suchen nach Begriffen innerhalb strukturierter Datei

Gerfried Fuchs alfie at ist.org
Sun Jan 4 16:20:17 CST 2004


* Christian Schoeller <c_p_s at gmx.net> [2004-01-04 21:44]:
> Wer Interesse am Code hat, kann hier [2] vorbeischauen - ich wollte
> eure Geduld durch reines Copy&Paste nach meinen Newbie-Problemen nicht
> noch mehr strapazieren ;-)

 ad add.pl: Ich würde die print-Ausgabe mit einem here-Dokument machen,
weil ich das um einiges ästhetischer halte:

print <<'END';
Content-type: text/html

<h1>Die Datenbank wurde korrekt angepasst!</h1>
<a href=../perl.html>Nochmal! Nochmal!</a>
END

 ... abgesehen davon, dass das da bei *weiten* kein HTML ist, da fehlt
die DOCTYPE und das komplette Gerüst.

 ad search.pl:
          $matched{"$i"}="$n" if $dbase[$i]->[$n]=~/[^N^n]*$such[^N^n]*/;

 Ich weiss zwar nicht genau, wie YAML die Daten retour gibt, aber was
soll das [^N^n] bedeuten?  Das matcht alles, was nicht N, n oder ^ ist
-- ist das so beabsichtigt, oder ist das zweite ^ da drin ein
Denkfehler?

 Wieso ist use warnings in search.pl auskommentiert?  Gabs da eine
Fehlermeldung?

 Schönen Abend noch,
Alfie
-- 
Richard had noticed that events were cowards:
they didn't occur singly, but instead they would
run in packs and leap out at him all at once.
                                  -- Neil Gaiman, "Neverwhere"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.pm.org/pipermail/vienna-pm/attachments/20040104/2e289221/attachment.bin


More information about the Vienna-pm mailing list