I have a very limited knowledge of Perl, but thought it to be the right tool for this job:
1)Search for a file in a specific directory with name such as filename001.txt
2) Check that the previous file processed succesfully was filename.000.txt, if not, write to an error file.
3) Process the file by inserting its contents into a mySQL database. When done, write to a file an OK (or true indicator) with 001 to relate it to the file processed. If process to mySQL unsuccesful try to reprocess. If still unsuccesful write to an error file.
This would run as a cron on a Unix machine every hour. The file to be processed is a database update being ftped from a Windows server via an app that checks the output files generated above to determine which file to upload (i.e. filename001 instead of filename000), if filename 001 is not yet OK'ed, it will reupload it. It will not upload filename002 until 001 is processed correctly, and so on.
So, I need to know if Perl IS the right tool for this. Also need to know if someone is willing to help me through this (a lot of handholding probably).
Thanks in advance and kudos on a superb Perl site.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.