I have been trying to figure out how to do something. Basically, i want to split a string into pieces of 2 characters each. An example:
$mystring = "perl monks" The output should be:
$my_splitted_string = "pe er rl mo on nk ks"
From this i want to show that each word should be split in 2 character words with the last character of a word being the first character of the next word.
Thanks for reading this
In reply to Splitting a string by lampros21_7
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |