Skip to content

Instantly share code, notes, and snippets.

@tudorconstantin
Created August 9, 2015 09:13
Show Gist options
  • Save tudorconstantin/b5ba8746864def00f710 to your computer and use it in GitHub Desktop.
Save tudorconstantin/b5ba8746864def00f710 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
#Write a program, codepoints2char.pl, that can take a list of decimal (not hexadecimal) numbers
#and print the Unicode character. Assume UTF-8. Try running it with the following:
#perl codepoint2char.pl 3232 95 3232.
use strict;
use warnings;
use diagnostics;
use feature 'say';
binmode STDOUT, ':utf8';
while ( my $string = shift) {
say "got $string, unicode: ".chr($string);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment