On Tue, 4 Jan 2005, Patricio Bruna V wrote:

>   are any module that can parse text files with some definitions of
> segment that i define?

Depending on what the format is, yes, maybe.
 
> i have a file where the blocks starts with [foo] and last to the next
> block.
 
The Windows .ini config file format looks a bit like that: you have 
sectons flagged with a [foo] token, followed by a series of "a = b" 
parameters, with a file consisting of one or more sections. 

If that is the format you're dealing with, then Config::INI is (if I 
remember correctly -- verify at http://search.cpan.org/) the module you 
need.

Of course, the .ini format is really simple, and writing your own parser 
wouldn't be that hard to do either, but when the library already exists 
to do the work for you, you might as well lean on that so you can go do 
more interesting things with your code ...
 
 

-- 
Chris Devers

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to