my $file; my @lines; open FH, 'yourlogfile.log'; @lines = <FH>; LINE: while ($file = pop @lines) { if ( $file =~ m/^ORA*/ ) { print "$file\n"; } last LINE if ($file !~ m/^$today*/ && $file =~ m/^(\S+\s+\S+\s+\d+)\s+\d+:\d+:\d+\s+(\d+)/x ); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reading a file in reverse until yesterdays date.
by runrig (Abbot) on Aug 14, 2001 at 01:29 UTC | |
|
Re: Reading a file in reverse until yesterdays date.
by Anonymous Monk on Aug 14, 2001 at 01:24 UTC |