in reply to Splitting on uppercase letters

Updated: This solution is pretty lame, and also fails the test case pointed out by Anonymous Monk. Use antirice's solution.

Well, I really doubt that this is the nicest way, but it does use split. (Mind you, it needs a regex substitution first...)

use strict; my @strings = qw (ThisString SomeOtherString); foreach (@strings) { s/([a-z])([A-Z])/"$1:$2"/eg;` my @tokens = split /:/; print join "\n", @tokens; print "\n"; } __END__ # Output: This String Some Other String

</ajdelore>