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
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
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
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
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
-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
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 =