Instead of using split you can just use a regular regex.
my $test = "JohnSmith"; my ($first, $last) = $test =~ /([A-Z][a-z]+)([A-Z][a-z]*)/; print "First: $first, Last: $last\n";
In reply to Re: split by a capital followed by
by eric256
in thread split by a capital followed by
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |