#!/usr/bin/perl use warnings; use strict; use Encode qw(encode decode); my $enc = 'utf-8'; # This script is stored as UTF-8 my $str = "úlcera\n"; # Byte strings: print ucfirst $str; # prints 'úlcera', ucfirst didn't have any effect. # text strings:: my $text_str = decode($enc, $str); $text_str = ucfirst $text_str; print encode($enc, $text_str); # prints '?lcera', ucfirst as specified.