Help for this page

Select Code to Download


  1. or download this
    while ($s =~ /abc/g) {
       print "found abc at $-[0]\n";
    }
    
  2. or download this
    while ($s =~ /aa/g) {
       print "found aa at $-[0]\n";
    }
    
  3. or download this
      found aa at 1
      found aa at 3
    
  4. or download this
    while ($s =~ /aa/g) {
       print "found aa at $-[0]\n";
       pos($s) = $-[0] + 1;
    }