[thelist] perl: show me the last n lines from this file

Anthony Baratta Anthony at Baratta.com
Sat May 12 03:48:23 CDT 2001


At 01:29 PM 5/11/2001, you wrote:
>Sam-I-Am wrote:
> >
> > I'm trying to build a page (cgi) that displays the last say 20 access
> > from the web access-log. (or 5k, or whatever)

If this is a *NIX box why not try using the "tail" command?

e.g.

    $Last20Lines = `tail -20 $TargetFileName`;

    print $Last20Lines;
---
Anthony Baratta
President
Keyboard Jockeys





More information about the thelist mailing list