No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / examples / hello-perl / hello-1.pl.in
blob885311ab68c3ff85deb62204a70c65ea3294b315
1 #!@PERL@
2 # Example for use of GNU gettext.
3 # Copyright (C) 2003 Free Software Foundation, Inc.
4 # This file is in the public domain.
6 # Source code of the Perl program, using the Locale::Messages API.
8 use Locale::Messages qw (textdomain bindtextdomain gettext);
9 use POSIX qw(getpid);
11 binmode STDOUT, ':raw'; # Needed to make it work in UTF-8 locales in Perl-5.8.
13 sub _ ($) { &gettext; }
15 textdomain "hello-perl";
16 bindtextdomain "hello-perl", "@localedir@";
18 print _"Hello, world!";
19 print "\n";
20 printf _"This program is running as process number %d.", getpid();
21 print "\n";