Mar 22, 2002
525 Vues
0 0

Parsing Interesting Things

Ecrit par

Someone recently popped into one of the newsgroups I frequent and asked how to parse an INI file. You might have seen those before, with sections and keyword=value lines, like:






I think they started in the Microsoft world, since no sane UNIX hacker would have come up with something like that. No, we come up with things like .Xdefaults and and termcap. But the request seemed simple: parse the file and gather the information into a hash for quick access, two levels deep, of course.

Url : Article complet

Site :


Laissez un commentaire

Menu Title