pos is the way to do it directly.
DB<111> $str1 = "000001";$str1 =~ m/[^0]/g; print pos($str1) 6
Cheers Rolf
( addicted to the Perl Programming Language)
In reply to Re: index using a range
by LanX
in thread index using a range
by romano
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |