in reply to Re^2: Concatenate every 5 lines of input with a comma.in thread Concatenate every 5 lines of input with a comma.
while ( <DATA> ) { chomp; print $_, $.%5 ? ";" : $/; } [download]