Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    
    my $string = 'ABCDEFGHIJKL';
    print "$1$2 at ".pos($string)."\n" while ($string =~ /(.)(?=(...))/g);
    
  2. or download this
    print "$1$2 at ". ($-[0] + 1) ."\n" while ($string =~ /(.)(?=(...))/g)
    +;