Hi All: I have this code... #!/opt/perl64/bin/perl -w # v5.8.4 built for PA-RISC2.0-LP64 use Getopt::Long; my %optctl = (); Getopt::Long::GetOptions( \%optctl, "x!", "z!") or die "\nOption Error\n\n"; my( $headerFlag, $duplexFlag ); if ( $optctl{z} ) { $headerFlag = $optctl{z}; } else { $headerFlag = 1 }; if ( $optctl{x} ) { $duplexFlag = $optctl{x}; } else { $duplexFlag = 0 }; print "header = $headerFlag\n"; print "duplex = $duplexFlag\n"; When I run it, I get this: $ ./p header = 1 duplex = 0 $ ./p -x header = 1 duplex = 1 $ ./p -x -noz header = 1 duplex = 1 $ ./p -nox -noz header = 1 duplex = 0 My problem is that header is always 1 and I don't think it should be when I specify "-noz". If I can toggle the value of the 'x' option, why not the 'z' option? What am I not seeing? Thanks, Mike --- ====================================================================== Michael P. Vergara Oracle DBA Guidant Corporation www.guidant.comThread Next