Leser: 27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#
## Funktion Tauschen diverser Spezialzeichen aus Win-1252 #####################
#
sub update
{
$_ =~ s/\xc4/Ä/g;
$_ =~ s/\xe4/ä/g;
$_ =~ s/\xd6/Ö/g;
$_ =~ s/\xf4/ö/g;
$_ =~ s/\xdc/Ü/g;
$_ =~ s/\xfc/ü/g;
$_ =~ s/\xdf/ß/g;
$_ =~ s/\x80/&euro/g;
return;
}
1
2
3
4
5
6
7
sub replace_special_chars {
my $text = shift;
$text =~ s/foo/bar/g;
return $text;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
sub update {
local $_ = shift;
s/\xc4/Ä/g;
s/\xe4/ä/g;
s/\xd6/Ö/g;
s/\xf4/ö/g;
s/\xdc/Ü/g;
s/\xfc/ü/g;
s/\xdf/ß/g;
s/\x80/&euro/g;
return $_;
}
$foo = update($foo);