require Text::Unidecode if $asciify; while ($line = ) { chomp($line); $line = Text::Unidecode::unidecode($line) if $asciify; ... }