use strict;
use warnings;
use utf8;
my $str = 'עוד להיט';
binmode STDOUT, ":encoding(utf8)";
print $str;
It's important to note that whatever is rendering your script output must be capable of handling whatever unicode characters you throw at it. If this script doesn't work right in the context you are having trouble then the fault is not with Perl but with the context.
Update: Note that PerlMonks has munted the unicode characters :-(. The original script used Unicode characters for the string, not entities. The following also works and uses HTML entities in place of the unicode characters:
use strict;
use warnings;
use utf8;
use HTML::Entities;
my $str = 'עוד להיט';
binmode STDOUT, ":encoding(utf8)";
print HTML::Entities::decode ($str);
True laziness is hard work
|