Bryan, I dunno what the exact problem is. Things you might try: 1) change while($line = <$logfile>){ to while(defined($line = <$logfile>)) { 2) after count++;, put last if count > 0; (if that works, try 1, 5, etc) 3) if you are reading in a non-mac file, the line termination might be incorrect. Try $/ = "\015\012"; for MSDOS type of carriage returns. 4) turn on the debugger with #!/usr/bin/perl -wd and step through the program (with manual at hand) 5) try using a IO primitive with a lot of control, like sysread(FILEHANDLE, SCALAR, LENGTH) to see exactly what your input file is looking like to perl. Happy Debugging! :-) -- Larry >Ok. I'm just not seeing what I'm doing wrong here. >while($line = <$logfile>){ > ... > $count++; >} > >**************************************** >Bryan Patzke >milo@enteract.com >patzbry@iit.edu >http://www.enteract.com/~milo >**************************************** -- Regards, Larry F. Allen-Tonar (larryat@cts.com) +1 760/746-6464 (voice) Principal Designer +1 760/746-0766 (FAX, P.O. Box 463072 upon request) Escondido, CA 92046-3072 ***** Want to unsubscribe from this list? ***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch