in reply to
Check if one string is a substring of another.
perl -e '$s1="foofoo";$s2="foo";(length$s1<length$s2)?$check=index$s2,$s1:$check=index$s1,$s2;print "match\n" if $check>=0'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@
Comment on
Re: Check if one string is a substring of another.
Download
Code
In Section
Seekers of Perl Wisdom