File: tstopt1

package info (click to toggle)
libgetopt-mixed-perl 1.008-6
  • links: PTS
  • area: main
  • in suites: woody
  • size: 72 kB
  • ctags: 11
  • sloc: perl: 228; makefile: 33
file content (21 lines) | stat: -rw-r--r-- 920 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!perl
# $Id: tstopt1 1.1 1996/02/08 23:02:48 Madsen Exp $

BEGIN {unshift @INC, 'lib'} # So you don't have to install Getopt::Mixed first

use Getopt::Mixed 1.006, 'getOptions';

getOptions("apples=f a>apples apricots=f b:i c d:s file=s f>file pears=f",
           "help ?>help version V>version");

print '$opt_apples = ',$opt_apples,"\n"      if defined $opt_apples;
print '$opt_apricots = ',$opt_apricots,"\n"  if defined $opt_apricots;
print '$opt_b = ',$opt_b,"\n"                if defined $opt_b;
print "\$opt_c\n"                            if $opt_c;
print '$opt_d = ',$opt_d,"\n"                if defined $opt_d;
print '$opt_file = ',$opt_file,"\n"          if defined $opt_file;
print '$opt_pears = ',$opt_pears,"\n"        if defined $opt_pears;
print "\$opt_help\n"                         if $opt_help;
print "\$opt_version\n"                      if $opt_version;

print "ARGV = ",join(' ',@ARGV),"\n";