Perl: Several ways to generate Unicode

Once you find a Unicode code point you can put it into a Perl string in several ways:

my $thumbs_up = "";

$thumbs_up = "\x{1F44D}";
$thumbs_up = "\N{U+1F44D}";
$thumbs_up = chr(0x1F44D);
$thumbs_up = pack("U", 0x1F44D);

# Make sure STDOUT is set to accept UTF8
binmode(STDOUT, ":utf8");

print $thumbs_up x 2 . "\n";


Note: Replies will be formatted with PHP Markdown Extra syntax.

Name: Email (Not Required):
 
Logged IP: 3.141.198.13
To prevent spam please submit by clicking the kitten: