It seems that it does not recognize the accented Ó as uppercase
#!/usr/bin/env perl use strict; use warnings; use 5.14.0; use utf8; use feature \'unicode_str
You're missing use open ':std', ':locale'; to properly encode your output.
use open ':std', ':locale';
If that doesn't work, your file isn't encoded using UTF-8 even though you tell Perl it is.