in reply to How do I split up a long string with no spaces?
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.
|
|---|