#!perl
# $Id: tstopt2 1.1 1996/02/08 23:03:18 Madsen Exp $

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

use Getopt::Mixed 1.006, 'nextOption';

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

while (($option, $value, $asEntered) = nextOption()) {
    if (defined $value) {
        printf "%-9s %7s = %s\n",$asEntered,$option,$value;
    } else {
        printf "%-9s %7s\n",$asEntered,$option;
    }
}

Getopt::Mixed::cleanup();

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