Help for this page

Select Code to Download


  1. or download this
    my %subst;
    @subst{@first_half} = @second_half;
    s/\Q$_\E/$subst{$_}/ for keys %subst;
    
  2. or download this
    for (my $i = 0; $i < @first_half; $i++) {
        s/\Q$first_half[$i]\E/$second_half[$i]/;
    }