Heavenly Beloved,
I need devine guidance on this one as I am fairly new to Perl and haven't seen any examples on how to do the following:
1. Open and read from a file.
2. Close the file
3. Open the file again from the offset from which it was closed previously.
Basically I have a log file I need to parse every night and unfortunately the log file continues to grow everyday. So I will need to open it, parse it, put some data in a database every night and I need an efficient means of knowing where the file was closed the previous days so as not to introduce redundant data.
All guidance, wisdom or pennance greatly appreciated....
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.