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

Re: index using a range

by hbm (Hermit)
on Jun 14, 2013 at 00:00 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1038867]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (9)
As of 2024-03-28 09:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found