Mega Code Archive

 
Categories / Perl / System Functions
 

For a text string value, use

#Getopt::Long::GetOptions('header=s' => \$header_string); #!/usr/bin/perl -w use Getopt::Long; Getopt::Long::GetOptions(      'header=s'        => \$header_string); if ( defined( $header_string ) ) {     print "header flag set to $header_string\n"; }