Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: index using a range

by hbm (Hermit)
on Jun 14, 2013 at 00:00 UTC ( #1038867=note: print w/ replies, xml ) Need Help??


in reply to index using a range

$Str1 = "000001"; #$Index = index($Str1, [1-9]); $Index = @{[$Str1=~/(?<=0)./g]}+0; print "$Index\n";

Update: Doesn't work for "001001", for example...


Comment on Re: index using a range
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (11)
As of 2015-07-28 08:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (254 votes), past polls