sub tyem { my( $s, $c, $n ) = @_; 0 while $s =~ /\Q$c/g && 0 < --$n; my $rv = pos( $s )-1; pos($s) = -1; return if 0 < $n; return $rv; }