in reply to Reading files n lines a time
/usr/bin/perl -w use strict; my @a; while ( (@a) = map { (scalar(<>) or ()) } (0..4) ) { print join("|", @a); } [download]