in reply to Split without removing characters

Another way to do it:

my $foo = "Hello WorldFoo BarPerl MonksSlash Dot"; print join (" \n", split (/(?<=[a-z]| )(?=[A-Z])/, $foo));

Perl is Huffman encoded by design.