Hi: I am trying to use Getopt::Long. I wrote a simple script and testing it. Why is the script running without me having to specify any arguments? I thought the = was so that the option is mandatory but it is not working that way. I am hoping that it will not run (so that when user runs it without arguments, script will stop).
Thanks. Satish #!c:\perl -w require 5.002; use Cwd ; use Env; use Getopt::Long; $result = GetOptions ("queue_name_prefix=s" => \$ENV{QUEUE_PREFIX}, # subject prefix "i2_data=s" => \$ENV{I2_DATA}, # location of data relative to CONTROLS_HOME "port:i" => \$ENV{DF_PORT}, # port number "startup_file|startup:i" => \$ENV{STARTUP_FILE}); # startup file print "The prefix is $ENV{QUEUE_PREFIX}\n"; print "Hello"; #comment can come after statement #-- setenv is a sub script must use return instead of exit exit (0); __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com _______________________________________________ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs