$ perl -pe 's/^(?=.*utf8)/#/' 1.pl | tee 1.without_utf8.pl #!/usr/bin/perl -w use 5.011; #use utf8; use Devel::Peek; my $string = 'Gödel'; Dump($string); $string = 'über'; Dump($string); $string = 'alleß'; Dump($string); $