Eri Mendz wrote:
>
> dear wiggins and all,
>
> first off, thanks for your replies. you guys are very helpful.
>
> yep i found the errant lines in the log causing the problem. i deleted
> them lines and errors gone. i wasn't able to improve much the script i
> started. its kinda hard dividing my non-programming work and perl
> together.
>
> i take this chance to thank John W. Krahn for providing answer to my
> problem. His code does it and i modified it a bit:
You're welcome. :-)
> #!/usr/bin/perl -w
> use strict;
>
> my $time = 0;
> while (<>){
> next unless /Connect time ([\d.]+) minutes/;
> $time += $1 / 60;
> }
> printf "time consumed is %.2f hours\n", $time;
>
> question: in the regexp above, inside the character class, is the dot
> any char or a literal dot? i read it as: either a digit or a dot, one or
> more times. Nice day all.
Inside the character class the dot is a literal dot
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]