$ cat destructive_sub.pl use warnings; use strict; my $param = 'Now is the time'; print "$param\n"; do_it($param); print "$param\n"; sub do_it { $_[0] =~ s/([it])/uc($1)/ge; } krevulax:~ [roboticus] $ perl destructive_sub.pl Now is the time Now Is The TIme