Help for this page

Select Code to Download


  1. or download this
    $_ = 'abxy' x 12;
    for(my $i = 0; m/ab/g and $i++<5;) {
        substr($_, $-[0], $+[0]-$-[0]) = 'abXab';
    }
    print;
    
  2. or download this
    $_ = 'abxy' x 12;
    for(my $i = 0; m/ab/g and $i++<5;) {
    ...
        pos = $-[0]+5;
    }
    print;
    
  3. or download this
    my $length = length(substr($_, 2, 2) = 'abXab');
    print $length;