- The assignment
- gbn's tricks:
- Ignore "still logged in" lines: we don't know when they
logged out; don't know when the log was generated, so can't include
their statistics
- Put each line into an array. Group the arrays by
username (since we like to report by-user stats). Thus, the
main datastructure is a hash (usernames) of arrays (log lines),
or HoA from man perldsc
- Transform all times into minutes; translate months into
month numbers (for sorting); skip unwanted fields.
- Start by looking at the required input/output, rather
than from all possible things you might do with the logfile.
Here's gbn's simple solution
|