Fancy::Split splits a string into groups.
This document describes Fancy::Split version 1.0.
my $string = "red, orange, yellow, spring, green, teal, cyan, azure,
blue, violet, magenta, pink, white, black, gray";
my @array = fancy_split(', ', $string, 2);
[
'red, orange',
'yellow, spring',
'green, teal',
'cyan, azure',
'blue, violet',
'magenta, pink',
'white, black',
'gray'
];
fancy_split
can be exported and returns a referenced array split by a user specified amount. It takes two paraments: the size of the groups and the string to be split. The size can be any integer.
Fancy::Split depends on Exporter.
Lady Aleena
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
Copyright © 2020, Lady Aleena (aleena@cpan.org)
. All rights reserved.