Help for this page

Select Code to Download


  1. or download this
    print "$1 method $2\n" while $x =~ /^([AB])(.+)$/mg;
    
  2. or download this
    # always match the entire string, running your code on matching lines
    /^(?: (?: ([AB]) (.+) (?{ print "$1 method $2\n"; }) | .* ) \n? )*/x