Re: [MacPerl] showing text lines

2002-01-12 Thread Jay Bedsole
> how can i count the numbers of lines text of a log file > and how do i show the number Seems like every perl book I've ever read gave this example: while ; $count = $.; The special variable $. holds the number of lines read. Of course, it only works if you're using only one file. jay

Re: [MacPerl] showing text lines

2002-01-12 Thread Keary Suska
ECTED]> > Date: Fri, 11 Jan 2002 12:14:38 -0800 > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: RE: [MacPerl] showing text lines > > Well, if the log file is small enough you can just loop through the file and > increment an index at every pass and that should be go

Re: [MacPerl] showing text lines

2002-01-11 Thread Detlef Lindenthal
Multi-Graphics wrote: > how can i count the numbers of lines text of a log file > and how do i show the number > and how can i print for example line 5 to 15 > > thanks In [U,Li]n[i,u]x type this, if you want to read lines 22 through 33: more -22 +11 /my_source_path/my_source_file Add

RE: [MacPerl] showing text lines

2002-01-11 Thread Adam Russell
> macperl <[EMAIL PROTECTED]> [MacPerl] showing >text lines >how can i count the numbers of lines text of a log file >and how do i show the number >and how can i print for example line 5 to 15 > >thanks PS: You

Re: [MacPerl] showing text lines

2002-01-11 Thread David Iberri
Multi-Graphics wrote: > how can i count the numbers of lines text of a log file Try $lines = 0; open(FILE, 'file') or die $!; $lines++ while ; close(FILE); > and how do i show the number To print the number of lines to STDOUT: print "Number of lines: $lines\n"; > and how can i print for exa

[MacPerl] showing text lines

2002-01-11 Thread Multi-Graphics
how can i count the numbers of lines text of a log file and how do i show the number and how can i print for example line 5 to 15 thanks