Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: find a substring of unknown length if it is in a hash

by Eily (Monsignor)
on Jun 29, 2015 at 09:20 UTC ( [id://1132433]=note: print w/replies, xml ) Need Help??


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 }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1132433]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-04-19 12:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found