#! /usr/bin/perl use strict; use warnings; use 5.010; sub foo { $_[0] =~ s/Echo/Otto/; } my $text = "Hallo Echo"; foo($text); # schau nach, was nun in $text steckt say $text;