Help for this page

Select Code to Download


  1. or download this
      my $first;
       ...
      my $second = $first;
      $second =~ s/some/substitution/;
    
  2. or download this
    my @output = map {
            my $temp = $_;
            $temp =~ s/some/subst/g;
            $temp
        } @input;
    
  3. or download this
    use Regex::FunctionalSubstitute;
    my $first;
     ...
    my $second = $first \~ s/some/subst/g;
    
  4. or download this
    my @output = map {
            $_ \~ s/some/subst/g;
        } @input;
    
  5. or download this
    package Regex::FunctionalSubstitute;
    use Filter::Simple;
    ...
    );
    
    1;