in reply to Grabbing lines three-by-three from a file
THREE: { my @three; push @three, scalar(<DATA>) or last THREE for 1..2; chomp @three; while (<DATA>) { chomp; push @three, $_; print "@three\n"; shift @three; } } [download]