Help for this page

Select Code to Download


  1. or download this
    my $str = "eeeeaaaabbbeeee";
    $str =~ s/((a+)(??{'b'x length$2}))/'c' x (length($1) * .5) . 'd' x (l
    +ength($1) * .5)/e;
    
  2. or download this
    #!/usr/bin/perl
    use strict;
    ...
    };
    my $parser = Parse::RecDescent->new($grammar);
    $parser->match('sing aaaaaabbb song');