Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1038867]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2016-12-11 08:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (169 votes). Check out past polls.