note
ww
Depending on the way your files-which-need-to-be-read-four-lines-at-a-time (henceforward, "fwn") are formatted/organized and the consistency thereof, you might consider setting your <c>$/</c> record separator...
<p>for ex, if data looks like:</p>
<c>name
date
bill
name1
date1
bill1
...</c>
<p>then setting <c>local $/="\n\n"</c> will tell Perl that you want to read a paragraph from the fwn, where paragraph is defined as something ending in two consecutive newlines. Better yet, the special case, <c>$/=""</c> defines para somewhat more broadly and may be suitable to deal with your data.</p>
<p>You'll find many examples here, if you merely SuperSearch for <c>$/</c></p>
1007560
1007560