$ perl -wle' $string = "etwas muss weg"; $string_weg = "weg"; $string =~ s/$string_weg//; print $string' etwas muss