#!/usr/bin/env perl use utf8; use strict; use warnings; MAIN: { binmode(STDOUT, ":utf8"); binmode(STDERR, ":utf8"); binmode(STDIN, ":utf8"); my $s = "Hello, world! 🥰🇺🇸"; foreach my $c (split('', $s)) { print $c, "\n"; } }