Help for this page

Select Code to Download


  1. or download this
    # we read a line from somewhere to $line
    # and @regex is our array of patterns
    foreach (@regex) {
        print "Match!\n" if $line=/$_/;
    }
    
  2. or download this
    # {
    #    my @matches;
    ...
    #    push @matches n if /nth_regex/;
    #    @matches;
    # }