How To Wiki

How to make substitutions in strings using PERL

1,795pages on
this wiki
Add New Page
Talk0 Share

In PERL you use a pattern match to find string and then it will replace it. to make a substitution in a string use this function.


$cow = "the cow smells bad";
$cow =~ s/bad/good/;
print $cow;

result: the cow smells good

From HowTo Wiki, a Wikia wiki.

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on Fandom

Random Wiki