
savo
User
Sep 30, 2009, 8:30 AM
Views: 1746
|
|
Re: [savo] is this greedy?
|
|
|
This should work.
#!/usr/bin/perl use warnings; use strict; use 5.010; open( LOG, "<test.log" ) or die "can't open log file: $!\n"; my $c = 1; while (<LOG>) { chomp; if ( $c == 1 ) { if (/(ActiveConnectionsHighCount?)/) { say; } } if (/JDBC Runtimes fgrlog/) { ++$c; } }
(This post was edited by savo on Sep 30, 2009, 8:32 AM)
|