Telling m//g in list context to forget about the captures and just return the matches:
@list = "ZBBCZZ" =~ /(??{'(.)\1*'})/g;
or probably more exact: there are no captures m// can see
In reply to Re^6: Yet Another Rosetta Code Problem (Perl, Ruby, Python, Haskell, ...) (??{})
by pKai
in thread Yet Another Rosetta Code Problem (Perl, Ruby, Python, Haskell, ...)
by eyepopslikeamosquito
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |