Re: How to count lines in an output file

2002-02-19 Thread Tim Lago
thanks for everyones help, it worked great. "Tim Lago" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I've written a really simple script that opens a file, reads for specific > line of text and copies the matches to an output file, > > Here it is: > > open(IN

RE: How to count lines in an output file

2002-02-19 Thread Timothy Johnson
I guess I should have checked the responses first. Well, I guess if there was any doubt... :) -Original Message- From: Timothy Johnson To: 'Tim Lago '; [EMAIL PROTECTED] Sent: 2/19/02 8:12 AM Subject: RE: How to count lines in an output file You could always try something

RE: How to count lines in an output file

2002-02-19 Thread Timothy Johnson
You could always try something like this: while() { if(/$realname/) { print OUTFILE; $count++; } } $count should have the number of lines at the end. -Original Message- From: Tim Lago To: [EMAIL PROTECTED] Sent: 2/19/02 6:30 AM Subject: How to count lines in an output file

Re: How to count lines in an output file

2002-02-19 Thread Geoffrey F. Green
See below: On 2/19/02 9:30 AM, "Tim Lago" <[EMAIL PROTECTED]> wrote: > open(INFILE, "rmaccess1.txt"); > open(OUTFILE, ">outfile.txt"); > > print "Enter the name of the Media file to analyze and press Enter: \n"; > > chomp($realname = ); my $count; > while() { > > if(/$realname/) { > print

RE: How to count lines in an output file

2002-02-19 Thread John Edwards
ounter print "$counter lines were saved to the output file\n"; HTH John -Original Message- From: Tim Lago [mailto:[EMAIL PROTECTED]] Sent: 19 February 2002 14:31 To: [EMAIL PROTECTED] Subject: How to count lines in an output file I've written a really simple script that opens a

RE: How to count lines in an output file

2002-02-19 Thread Tony McGuinness
-Original Message- From: Tim Lago [mailto:[EMAIL PROTECTED]] Sent: 19 February 2002 14:31 To: [EMAIL PROTECTED] Subject: How to count lines in an output file I've written a really simple script that opens a file, reads for specific line of text and copies the matches to an output

How to count lines in an output file

2002-02-19 Thread Tim Lago
I've written a really simple script that opens a file, reads for specific line of text and copies the matches to an output file, Here it is: open(INFILE, "rmaccess1.txt"); open(OUTFILE, ">outfile.txt"); print "Enter the name of the Media file to analyze and press Enter: \n"; chomp($realname =