I have this log file that contains data with that format example maclaw796 pts/1 75-30-120-13.lig Wed Oct 12 19:27 - 19:33 hturner pts/1 tom-nilsons-mabc Wed Oct 12 12:30 - 13:23 nnt pts/2 99-59=5-115.ligh Tue Oct 11 15:51 - 15:54 end example and so on I'm only interested in the first elementon the log which is the loogin id and the month, and login time, and log out time. there are more that 200 records in that file. my program should extract from each line Logni, month, login time,and logout time. compute the total amounts of minutes that the user stayed online. For each user, keep a total online time for each month and print a report similar to the following: example Ehow Sep 145 minutes ehow Oct 38 minutes maclawty767 sep 240 minutes end example Please please help me with this. I'm really stuck

In reply to hw question by jyou519

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.