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

I am new to Perl and am trying to determine if Perl is the right tool for the job. We currently are processing flat files we receive from vendors. The flat files have a series of about 7 or 8 fixed length record types. We are changing our processes, which means our flat file layout is changing. We may be adding fields, deleting fields, or changing the length of fields in the various record types. For the time being, we will need to continue processing the old file formats along with the new file formats until all vendors switch to the new format. I was thinking of using Perl to read the file coming and determine if it is the old format or the new format. If it is the old format, we would reformat each record type, adding the new fields, deleting the obsolete fields, and changing field lengths where needed. Does this seem like something for which Perl would be good to use? Thanks, Larry

Replies are listed 'Best First'.
Re: File re-formatting
by Laurent_R (Canon) on Sep 19, 2014 at 18:57 UTC
    Yes, I really think that Perl would be good at that. Reading flat text data files is probably at least 50% of my activity, and not only I am convinced that Perl is really really good at that, but I have succeeded in a quite short period to convince all of my colleagues to switch to Perl for this type of data manipulation. Because they saw that I could develop things in about one third of the time they needed with other technologies, because they saw that I got less anomalies than they did, because they saw that my programs had good performances, and also because when they tried, they also got better results, even as beginners in the language.
Re: File re-formatting
by BrowserUk (Patriarch) on Sep 19, 2014 at 18:17 UTC
    Does this seem like something for which Perl would be good to use?

    Yes.

    (Need more help? Provide some details of your old and new file/record formats.)


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
Re: File re-formatting
by toolic (Bishop) on Sep 19, 2014 at 18:17 UTC
    Probably. From perlintro:
    Perl is a general-purpose programming language originally developed for text manipulation ...

    Read the link above, and jump right in writing some code.

Re: File re-formatting
by rnaeye (Friar) on Sep 21, 2014 at 17:12 UTC
    Yes, Perl would be right choice.