You can also create a neat array of the strings using this:
my $string = "thisisalongstringofcharacters"; my (@strings) = split /(.{5})/,$string;
Season the '5' in the split to taste. Gives a nice array for use in whatever you need it for.
In reply to Re: How do I split up a long string with no spaces?
by Daddio
in thread How do I split up a long string with no spaces?
by vroom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |