Providing some code is a good start, but please try to write something that compiles (if you did manage to compile your code, this means you didn't actually use strict). What you are looking for is the index function (although a regex would also work, but index is easier to use and understand).
if (-1 != index $str, $key) { # Do something }
In reply to Re: find a substring of unknown length if it is in a hash
by Eily
in thread find a substring of unknow lenght if it is in a hash
by perlynewby
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |