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

Sam-I-Am dsentelskids at sam-i-am.com
Fri May 11 16:28:53 CDT 2001


that's exactly what i was trying for. I tried again - still I just get
tac: access.log
(FWIW access.log does exist in the current dir)
Im on NT4.. maybe that's it? Or maybe I need to reinstall cygwin.

thanks a lot
Sam


> open (SYSLOG, "tac access.log|") or die "Can't open syslog: $!,";
> $count = 0;
> while (<SYSLOG>) {
>   if ( $count < 21 )
>     {
>       print;
>       $count++;
>      }
>   else
>     {
>       exit;
>     }
> }
> --------------------------------------------------------------------
> 
> .. and it works fine on my Win2000+cygwin system.




More information about the thelist mailing list