$/="\n\n"; print my $head=<DATA>; while ( my $store = <DATA>) { my $listing =<DATA>; chomp($store,$listing); print "\n\n<<<$store>>>\n$listing"; } __DATA__ STORE MONITORING REPORT as of 13-05-02 10:05:07 Scanning for FTFIMS STORE002 -rwxr-xr-- 1 admins store 59025 Apr 11 2012 eft100.cbr 16295 58 -rwxr-xr-- 1 admins store 61143 Nov 15 15:47 chk075.cbr 33334 60 yadda yadda ... STORE006 -rwxr-xr-- 1 admins store 59025 Apr 11 2012 eft100.cbr 16295 58 -rwxr-xr-- 1 admins store 61143 Nov 15 15:47 chk075.cbr 33334 60 yadda yadda ...
another approach would be using the flip-flop-operator aka Range Operators.
Cheers Rolf
( addicted to the Perl Programming Language)
In reply to Re: Splitting a file into records
by LanX
in thread Splitting a file into records
by TStanley
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |