Mega Code Archive

 
Categories / Perl / System Functions
 

Simple options

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"; }