Help for this page

Select Code to Download


  1. or download this
    my $t = 0;
    my @x = grep $t^=1, split /(?<=(.))(?!\1)/, $x;
    
  2. or download this
    my @x;
    push(@x, $1) while $x =~ /((.)\2*)/g;
    
  3. or download this
    my $t = 0;
    my @x = grep $t^=1, $x =~ /((.)\2*)/g;
    
  4. or download this
    my $t = 0;
    my @x = grep $t^=1, map /((.)\2*)/g, $x;