if (substr($large, 0, length($small)) eq $small) { ... }