Skip to content

Instantly share code, notes, and snippets.

@mpapec
Created November 22, 2017 20:11
Show Gist options
  • Save mpapec/8b310e5c5ab2b8e4a84a747160cfb6d2 to your computer and use it in GitHub Desktop.
Save mpapec/8b310e5c5ab2b8e4a84a747160cfb6d2 to your computer and use it in GitHub Desktop.
binmode STDOUT, ":utf8";
{
my @r = ("\x{2080}", "\x{2081}","\x{2082}", "\x{2083}", "\x{2084}", "\x{2085}", "\x{2086}", "\x{2087}", "\x{2088}", "\x{2089}");
sub sscript {
my $num = shift // $_;
my $ret = "";
$num =~ s/(\d)/$r[$1]/g;
return $num;
}}
print sscript(1234567890);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment