Two problems.
First, you have Unicode characters in the source code. Make sure you save the file as utf8 and use the utf8 pragma.
, , , unicode. Windows ? , . Mac OS Terminal set utf8.
-, "." , " " , , . , .
use warnings;
use strict;
use utf8;
binmode STDOUT, ':utf8';
print tweet_compress('cc ms ns ps in ls fi fl ffl ffi iv ix vi oy ii xi nj/, "\. " ,", "'),"\n";
sub tweet_compress {
my $tweet = shift;
$tweet =~ s/\. ?$//;
my @orig = ( qw/cc ms ns ps in ls fi fl ffl ffi iv ix vi oy ii xi nj/, '\. ' ,", ");
my @new = qw/㏄ ㎳ ㎱ ㎰ ㏌ ʪ fi fl ffl ffi ⅳ ⅸ ⅵ ѹ ⅱ ⅺ nj . ,/;
$tweet =~ s/$orig[$_]/$new[$_]/g for 0 .. $#orig;
return $tweet;
}