in reply to Read in the logfile

Would it be possible to show some sample input? Otherwise, in my understanding you are looking for something like this:

use strict; use warnings; while(<DATA>) { last if /^<xxx;/; } while(<DATA>) { last if /^<xxx;/; print; } __DATA__ line1 line2 <xxx; line3 line4 <xxx; line5

Replies are listed 'Best First'.
Re^2: Read in the logfile
by lddzjwwy (Novice) on May 27, 2013 at 08:28 UTC
    Hi, the input is sth. like:
    <syrip:survey; ORDERED < EX-A 9UCIE6CG0CL235_____D331 AD-12 TIME 130429 1428 PAGE 1 SOFTWARE RECOVERY SURVEY EVENT TYPE EXPLANATION EVENTCNT FRDE +L 8 FORLOPP MANUALLY INITIATED FORLOPP RELEASE +1 7 LARGE OTHER-EEDWL 6 LARGE OTHER-STARTUP 5 LARGE INIT START/RESTART AFTER INIT START EVENT CODE INF1 INF2 INF3 INF4 SIDE STATE DATE TIME AC +T 8 H'310C H'0000 H'0F98 H'0001 H'0000 A SINGLE 130116 153704 NO 7 H'9003 H'000A H'0000 H'0000 H'0000 B SINGLE 120912 113918 NO 6 H'9003 H'000A H'0000 H'0000 H'0000 B SINGLE 120906 090851 NO 5 H'9004 H'0000 H'0000 H'0000 H'0000 B SINGLE 120905 171355 NO END EX-A 9UCIE6CG0CL235_____D331 AD-12 TIME 130429 1428 PAGE 1 <sastp; ......
    Thanks a lot

      Just modify the regex to require at least one non-space after <

      use strict; use warnings; while(<DATA>) { last if /^<\S+;/; } while(<DATA>) { last if /^<\S+;/; print; # process your date here }