sub indexex
{
my ($str, $substr, $position) = @_;
my $start = $position || 0;
my $len = length $str;
my $sublen = length $substr;
my @retval = ();
return @retval unless $sublen;
while($start + $sublen < $len)
{
if(substr($str, $start, $sublen))
{
push @retval, $start;
}
$start++;
}
return @retval;
}