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