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

Hallo Monks, This is not particularly a question on perl errors or coding as such, but an opinion and view on a project i want to undertake using perl. i want to come up with an application, perhaps web-based that will track the movements of documents(we are talking of orders,letters, etc etc) in an org. It will then send mail to the users when the document gets to say the procurement dept, the finance dept etc etc....so as to avoid unnecessary delays in the processing of the documents. I want to implement this in perl and i was humbly requesting any opinion on how viable it is to use perl. Two, about the mailing, what core perl module would be appropriate to use? thanks

Replies are listed 'Best First'.
Re: document tracking in perl
by ian (Beadle) on Dec 17, 2007 at 09:33 UTC
    how viable it is to use perl
    • Define a document more precisely than "order" or "letter". For example, are these PDFs, plain text, Microsoft formats, etc.
    • Describe how documents are being sent, e.g. attachments to emails.

    Without information about the data in question or the methods of movement, it's hard to evaluate the situation.

    About mail, you'll also want to tell us what OS the system would be running on as well as the amount of traffic you expect to generate. In the meantime, you might try searching CPAN for send email.

    -- Ian Tegebo
      Sorry for the omissions. Majority of the documents (being letters, orders, directives,memos etc) are in Microsoft formats. The documents are being forwarded in softcopy as email attachments and also being hand delivered. ie, they are delivered by a messenger and then the recepient say a secretary, would input the receipt of the document thus updating a database which in turn will inform the owner of the document that his/her document has being received and is being worked on, via email. So in essence i want to eliminate the loss of documents and also acknowledgements that the letters, memos are successfully delivered. Sort of an alert system Any ideas and opinions?
        It sounds like your goal is to track the delivery of email throughout your org.

        In this case, a programming project is perhaps not so much what you have as much as a design problem with regards to your email infrastructure. You should look into topics like "delivery status notification", "return receipt", etc. Of course, Perl would probably be suitable for any glue code you'd need for this.

        On the other hand, you could write a CGI in Perl that one would use to send these kinds of documents; it would present a form with fields for the department, particular recipients, and the paths(s) of the documents. However, in my experience people will think this is a clunky solution because it would disrupt the normal flow of sending what really just amounts to an email.

        One last suggestion: if the org had standardized on an email client then you might be able to add a feature to it, or extend it, to allow an interface to your tracking system. This may or may not be easier than trying to retrofit your email infrastructure for tracking attachment flow.

        Good luck.

        -- Ian Tegebo
Re: document tracking in perl
by TOD (Friar) on Dec 17, 2007 at 09:39 UTC
    as for your second question, it is very simple to send mail from a perl script by a piped open() call: open "|mail -s \"subject\" user@foo.org. you will find a detailed description in perldoc perlopentut.
    --------------------------------
    masses are the opiate for religion.