The stupid question is the question not asked | |
PerlMonks |
Re: index using a rangeby trizen (Hermit) |
on Jun 14, 2013 at 17:23 UTC ( [id://1039006]=note: print w/replies, xml ) | Need Help?? |
Using index with tr/// :
perl -E 'say index("000001000"=~tr/0/1/cr, "1")' # says "5"
In Section
Seekers of Perl Wisdom
|
|