use Encode; ... for my $entry (@entries) { $entry = decode('utf8', $entry); ...