Ok,, back to some laymen terms hehe... The file is read by an application and what I am doing is this. The application use to read this file that was created by hand to set some internal settings. I a wrote a program to pull the same info from a database. The auto generated file will ultimately be use for the program to read and set these internal values. I am trying to dump the current values from the program and do a compare between the file I auto created and whats in the program now. this is why I am trying to suck in all the values so I can do a compare and make sure the auto generated file does the same things as the current file that was made by hand. So the keys Idea is a no go. I am glad at least the data was good enough for us to kick around. The way they are writting is the only way they can be do to the application that reads them. How do you determine if an application has a portable library? I know nothing of that but sounds like something neat and witty.. If I could do that and use a perl module that would be nice.
perlknucklehead I know nothing of xml I am sorry to say. you kinda dove off of the big diving board and I am still back putting on my floaters. hehehe... On Thu, 2003-12-11 at 12:39, drieux wrote: On Dec 11, 2003, at 10:52 AM, Eric Walker wrote: > Well, the problem is that this is just one section > of a file the other sections actualy have different format. [..] > every know and then you get something > like list( "one" "two"). [..] > The data i am making up as I didn't think it > was important. I figured the form is what was needed. [..] > Once I get the > key value pairs it doesn't matter because I am going to read another > file like this and compare the data to make sure nothing has changed > between the two files. [..] p0: the 'data' that you made up, was good enough to get us some direction to start looking at solutions. p1: You might ultimately want to look at a re-write of how those 'files' are being created, so that the sub-sequent post parsing is simpler. IF that is not an option - then you might want to see if the application that created the format has a library that can be 'ported' and hence build out a perl module of your own that would share it's parser structure. p1.1 - either go with say an xml-ish model hence use the LibXml module for parsing p1.2 - assume that the applications library is lib_fung_parser.so - then you want to get your hands on the header files and use h2xs to generate your Fung::Parser module p2: The problem of multiple section readings from a file should lead you towards a simpler process where you have keys in the file that indicate which 'parser' to be using at which point you might want to look at a 'dispatcher'... where each 'function' knows how\ to return stuff related to what it knows how to read, and specifically how it's 'end of section' will tell it to stop parsing and go back. ciao drieux --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>