Help for this page

Select Code to Download


  1. or download this
    my %subs = (
        '\?a\?' => 'aRep',
    ...
    for my $match (keys %subs) {
        $string =~ s/$key/$subs{Skey}/g;
    }
    
  2. or download this
    my @subs = (
        ['\?a\?' => 'aRep'],
    ...
    for my $match (@subs) {
        $string =~ s/$match->[0]/$match->[1]/g;
    }