Help for this page

Select Code to Download


  1. or download this
    my @SUB_REC = map {[qr{$_->[0]}, $_->[1]]} (
      ['(robert|bobby)', 'bob']
    );
    
  2. or download this
    foreach (@SUB_REC) {
      $yourText =~ s/$_->[0]/$_->[1]/g;
    }