in reply to find a substring of unknow lenght if it is in a hash
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 }
|
|---|