A slight variation on the solution proposed by vsespb, I think this is a little closer to what you want.
my $Str1 = "000001"; my $Index = length($1) if $Str1 =~ /^(0*)[1-9]$/; print "$Index\n";
In reply to Re: index using a range
by rnewsham
in thread index using a range
by romano
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |