programming-examples/perl/SystemFunction/Simple options.pl
2019-11-15 12:59:38 +01:00

17 lines
243 B
Perl

use Getopt::Long;
GetOptions("german" => \$german,
"french" => \$french);
if ($german) {
print "Guten Tag!\n";
}
if ($french) {
print "Bonjour!\n";
}
if (!$german && !$french) {
print "Hello!\n";
}