Help for this page
perl -ple'$\ = $.%5 ? ";" : $/' infile > outfile
perl -i.bak -ple'$\ = $.%5 ? ";" : $/' file
while ( <DATA> ) { chomp; print $_, $.%5 ? ";" : $/; }