Post History
Perl, 3 distinct, 12 bytes s//yy//y/y// Try it online! Prepends yy to the start of $_, and then transliterates them, dividing the count of each.
Answer
#2: Post edited
## Perl, 3 distinct, 13 bytes- ```perl
s//gg//s/g//g- ```
[Try it online!](https://tio.run/##K0gtyjH9X1qcqpCWmlhSWpSqoF6cWKluzQUk/xfr66en6@sX6wOJ9P/W/wE)Prepends `gg` to the start of `$_`, and then removes each `g` one at a time. In a scalar context, `s///` returns the number of substitutions made.
- ## Perl, 3 distinct, 12 bytes
- ```perl
- s//yy//y/y//
- ```
- [Try it online!](https://tio.run/##K0gtyjH9X1qcqpCWmlhSWpSqoF6cWKluzQUk/xfr61dWAjEQ6v@3/g8A)
- Prepends `yy` to the start of `$_`, and then transliterates them, dividing the count of each.
#1: Initial revision
## Perl, 3 distinct, 13 bytes ```perl s//gg//s/g//g ``` [Try it online!](https://tio.run/##K0gtyjH9X1qcqpCWmlhSWpSqoF6cWKluzQUk/xfr66en6@sX6wOJ9P/W/wE) Prepends `gg` to the start of `$_`, and then removes each `g` one at a time. In a scalar context, `s///` returns the number of substitutions made.