fseng has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re: generic Perl program
by Corion (Patriarch) on Jul 08, 2009 at 06:39 UTC

    What is the generic goal of your unspecific question? We won't do your homework for you. It's likely that your course material covers the topic.

Re: generic Perl program
by rovf (Priest) on Jul 08, 2009 at 07:51 UTC
    why would a generic Perl program for parsing multiple record data files be useful?
    Because you could use it to parse multiple record data files.
    how does it work?

    First it opens the multiple record data file. Then it trundles for a while, parsing. Finally it closes the multiple record data file.

    (Generic question - generic answer).

    -- 
    Ronald Fischer <ynnor@mm.st>
Re: generic Perl program
by davorg (Chancellor) on Jul 08, 2009 at 08:27 UTC
    why would a generic Perl program for parsing multiple record data files be useful?

    It would be useful for parsing multiple record data files.

    and how does it work?

    I expect it would be magic.

    --

    See the Copyright notice on my home node.

    Perl training courses

Re: generic Perl program
by ELISHEVA (Prior) on Jul 08, 2009 at 11:05 UTC

    Usefulness, like beauty, is often in the eye of the beholder. If this isn't homework, I might guess that you saw something and said "why would anyone do that?" or else you are in a debate with someone about the value of (a) multiplicity or (b) genericity. Based on questions you have asked at Perl Monks so far I'm guessing that your question is in fact how to make a program for reading a very specific file more generally useful. But that is just a guess.

    Perhaps you could tell us what raised this question for you and how an answer will help you?

    Best, beth

Re: generic Perl program
by ikegami (Patriarch) on Jul 08, 2009 at 16:33 UTC

    why would a generic Perl program for parsing multiple record data files be useful?

    I don't accept the premise that it would be useful. Perl already has built-in functionality to handle fixed-width records ($/ = \$width;) and sentinel-terminated records ($/ = $sentinel;), so it would be redundant. Anything else wouldn't be generic.

    how does it work?

    (That should be "how would it work?")

    Quite well if I wrote it :)