Updated: oh, if you don't know which is shorter:
length($s1)>length($s2) ? $s1 =~ /\Q$s2/ : $s2 =~ /\Q$s1/;In reply to Re: Check if one string is a substring of another.
by ayrnieu
in thread Check if one string is a substring of another.
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |