my $string = "a(b)cd(e)f"; my @parts = split /(?=.{5}$)/, $string';