Help for this page

Select Code to Download


  1. or download this
    my $R = 'Russ Ethan Jason Eric';
    $R =~ /Ethan/;
    print index($R, $&), "\n";
    $R =~ /Eric/;
    print index($R, $&), "\n";
    
  2. or download this
    my @R = ('Russ Ethan Jason Eric JAPH', 'JAPH vroom Ozymandias neshura 
    +Russ');
    
    ...
        print "Found $& in string $i at: ", pos($R[$i]) - length $&, "\n";
      }
    }