http://qs321.pair.com?node_id=530097


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'


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@