my $sBegin = "hello world"; my $sEnd = $sBegin; for ($sEnd) { s/hello/goodbye/g; s/world/todo el mondo/; uc; }; print $sEnd;