summaryrefslogtreecommitdiff
path: root/gettext-tools/examples/hello-perl/hello-2.pl.in
blob: afb9b6a5c671aaf78a993ee2bdcf6952f92580b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!@PERL@
# Example for use of GNU gettext.
# This file is in the public domain.
#
# Source code of the Perl program, using the Locale::TextDomain API.

use Locale::TextDomain ("hello-perl" => "@localedir@");
use POSIX qw(getpid);

binmode STDOUT, ':raw'; # Needed to make it work in UTF-8 locales in Perl-5.8.

print __"Hello, world!";
print "\n";
print __x ("This program is running as process number {pid}.", pid => getpid());
print "\n";