use strict; use warnings; use feature 'say'; my $s = "hello world"; # =~ binds the substitution to the variable $s =~ s/world/perl/; say $s;
s/// edits in place