in reply to Regex Start Anchor with variables
Even faster than index() or a regex -- I would imagine -- would be substr() and eq together.
if (substr($large, 0, length($small)) eq $small) { ... }
In Section
Seekers of Perl Wisdom