1 2 3 4 5 6 7 8 9 10 11 12 13
#!/usr/bin/perl $text="ö"; print "$text 2\n"; $text =~ s/[éè]/e/g; print "$text 3\n"; $text =~ s/[öÖ]/oe/g; print "$text 4\n";
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#! /usr/bin/env perl use strict; use warnings; use utf8; use 5.14.0; binmode(STDOUT, ':utf8'); my $str = 'Wölle'; say "Original: $str"; $str =~ s/[éè]/e/g; say "after s/e/e/: $str"; $str =~ s/[öÖ]/oe/g; say "after s/ö/oe/: $str";
use utf8;