|Perl: the Markov chain saw|
Splitting a stringby lampros21_7 (Scribe)
|on Feb 08, 2006 at 15:44 UTC||Need Help??|
lampros21_7 has asked for the
wisdom of the Perl Monks concerning the following question:
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