my $var = 'diesIstEinTest'; $var =~ s/([A-Z][a-z]+?)/ $1/g;