Help for this page

Select Code to Download


  1. or download this
        my $new_string = testing_string($string); 
    
    ...
            $content =~ s/a/b/sg;
            return $content; #string copy, expensive
        }
    
  2. or download this
       # do stuff here
        my %test_var;
    ...
            # do some stuff here
            $test_var{$string} =~ s/a/b/sg;  
        }
    
  3. or download this
       testing_string(\$string); #send a reference to $string instead of $
    +string
    
    ...
            # do some stuff
            $$contentref =~ s/a/b/sg;
       }