Next | Tricks of the Wizards | 193 |
Our trick:
split /(a+)/, $string
This breaks $string into pieces which alternate between
Strings of a's
The other stuff that was between the a's
Note special split meaning of (capturing parentheses).
Next | Copyright © 2003 M. J. Dominus |