Question abount counting the total number of lines and put to an variable?
- From: marco@xxxxxxxxxxxx (Marco)
- Date: Thu, 29 Nov 2007 16:04:29 -0800 (PST)
Hi..
I have a question about how to count the total of line that shows on
the screen. Here below is my code..
open (MYFILE, '123.txt');
while (<MYFILE>) {
if ($_ =~ /^User:/) {
print $_;
}
}
close (MYFILE);
then it will shows the following on the screen,
User: ABC
User: DEF
Is there any way that I can get the total of lines that show on the
screen and put to a variable? " Thank you..
.
- Follow-Ups:
- Prev by Date: Re: Freebsd + cron job +perl script
- Next by Date: Re: Trouble with Email::MIME modules
- Previous by thread: Re: Freebsd + cron job +perl script
- Next by thread: Re: Question abount counting the total number of lines and put to an variable?
- Index(es):