Help for this page
use warnings; use strict; ... $line =~ s/\n(?!\z)/,/g; # Delimit with commas, except for last +\n print $line; }