in reply to index using a range
pos is the way to do it directly.
DB<111> $str1 = "000001";$str1 =~ m/[^0]/g; print pos($str1) 6 [download]
Cheers Rolf
( addicted to the Perl Programming Language)