Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: index using a range

by trizen (Friar)
on Jun 14, 2013 at 17:23 UTC ( #1039006=note: print w/ replies, xml ) Need Help??


in reply to index using a range

Using index with tr/// :

    perl -E 'say index("000001000"=~tr/0/1/cr, "1")' # says "5"


Comment on Re: index using a range
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (12)
As of 2014-10-20 08:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (74 votes), past polls