
String::tokenizer is a simple string tokenizer which takes a string and splits it on whitespace. it also optionally takes a string of characters to use as delimiters, and returns them with the token set as well. this allows for splitting the string in many different ways.
this is a very basic tokenizer, so more complex needs should be either addressed with a custom written tokenizer or post-processing of the output generated by this module. basically, this will not fill everyones needs, but it spans a gap between simple split / /, $string and the other options that involve much larger and complex modules.
also note that this is not a lexical analyser. many people confuse tokenization with lexical analysis. a tokenizer mearly splits its input into specific chunks, a lexical analyzer classifies those chunks. sometimes these two steps are combined, but not here.