Text::Split - Text splitting with fine-grained control
$data = <<_END_ # Xyzzy # --- START qwerty 1 2 3 4 5 6 8 9 10 The end # abcdefghi jklmnop _END_ $split = Text::Split->new( data => ... )->find( qr/#\s*--- START/ ) ( $split, $content ) = $split->find( qr/ The end/, slurp => '' )
# --- START qwerty 1 2 3 4 5 6 8 9 10 The end
( $split, $content ) = $split->find( qr/ The end/, slurp => '()' )
qwerty 1 2 3 4 5 6
With Text::Split, given a split in some text, you can access the text preceding and remaining the split. Consecutive splitting lets you slurp text from between splits (optionally including the text from the splits at either end).
This distribution is deprecated, and will be renamed to Text::Clip
Robert Krimen <firstname.lastname@example.org>
This software is copyright (c) 2010 by Robert Krimen.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.