Some elements from the following program might be useful for solving your problem.
#!/usr/bin/perl use strict; # https://perlmonks.org/?node_id=11151901 use warnings; use Path::Tiny; local $_ = path('FILE1')->slurp . path('FILE2')->slurp; my %seen; while( /^(.*:)(.*)/gm ) { $seen{$1}{$_}++ and print "$1$_\n" for split /~~/, $2; }
In reply to Re: Find common substrings
by tybalt89
in thread Find common substrings
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |