Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    my $i = 0;   # $i is used to filter out the captured $1 fields
    my @x = grep { ++$i % 2 } split(/(?<=(.))(?!\1)/, $str);
    for my $e (@x) { print "e='$e'\n" }