Help for this page
my $string = "XXXX"; my @count = split( "XX", $string ); print $#count; # Prints -1
my $string = "XXYY"; my @count = split( /(.)\1/, $string, -1 ); print $#count; # Prints 4, not 2.