Substitution Example : substitution « Regular Expression « Perl
- Perl
- Regular Expression
- substitution
Substitution Example
use strict;
use warnings;
my $string = "Hello to the world";
print "The original string is: \"$string\"\n";
$string =~ s/world/planet/;
print "s/world/planet/ changes string: $string \n\n";
Related examples in the same category