$ perl -e '$s="JustAnotherPerlHacker\n"; $s=~s/(?<=.)(?=[A-Z])/ /g; print $s' Just Another Perl Hacker