$ perl -e '$s="JustAnotherPerlHacker\n"; @a = split /(?<=\S)(?=[[:upper:]])/, $s; print "@a"' Just Another Perl Hacker