I hadn't thought much about a regex solution.
To ensure the match start is a complete line, requires a small tweak.
my $combine = "$file1$marker$file2" =~ s/(?:\A|\n)(.*)\K\Q$marker\E\1/ +/sr;
In reply to Re^2: CPAN Module to determing overlap of 2 lists?
by wazat
in thread CPAN Module to determing overlap of 2 lists?
by wazat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |