Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: index using a range

by trizen (Hermit)
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"

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1039006]
help
Chatterbox?
Discipulus Good day bros?!? oh tempora oh mores!
[amitkumarj441]: Hey everyone
[amitkumarj441]: I need to ask a question, where can I post my problem?
[Discipulus]: everyone is me
[Discipulus]: Seekers of Perl Wisdom is the for asking question
[Discipulus]: be sure to use code tags for code and data
[Discipulus]: and to show some effort while asking

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2017-04-26 20:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (488 votes). Check out past polls.