programming-examples/perl/SystemFunction/To turn a feature on or off. Use the exclamation point(!).pl
2019-11-15 12:59:38 +01:00

13 lines
349 B
Perl

#Getopt::Long::GetOptions('print_header!' => \$print_header);
#This option sets up --print_header or --noprint_header to turn off the option.
#!/usr/bin/perl -w
use Getopt::Long;
Getopt::Long::GetOptions('print_header!' => \$print_header);
if ( defined( $print_header ) ) {
print "print_header flag set to $print_header\n";
}