You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
492 B
Perl

#!/usr/bin/perl -w
use Getopt::Std;
Getopt::Std::getopts( 'a:b:c:de' );
# Options appear in variables named opt_option, e.g., opt_a.
if ( defined( $opt_a ) ) {
print "-a flag set to $opt_a\n";
}
if ( defined( $opt_b ) ) {
print "-b flag set to $opt_b\n";
}
if ( defined( $opt_c ) ) {
print "-c flag set to $opt_c\n";
}
if ( defined( $opt_d ) ) {
print "-d flag set to $opt_d\n";
}
if ( defined( $opt_e ) ) {
print "-e flag set to $opt_e\n";
}