#!/usr/bin/perl print "Wort1: "; $a=; chomp ($a); print "Wort2: "; $b=; chomp ($b); if ("$a $b" =~ /^(\w+?)(\w+) \2(\w+)$/ ) { print "$2 überlappt in $1-$2-$3\n"; }