Is there a better way to detect a parameter given in a command line? For
example, to run the script (obviously) c:\>script.pl I have also added
some "switches" to help with setup of the options (like) c:\>script.pl /h
to see a help message
c:\>script.pl /i to generate a new options file, etc. And it is all
working well.
Question: When NOT using a switch (just running the script), I am getting
a message I would like to supress or preferable fix by using more correct
code...
Use of uninitialized value in string ne at logsaver.pl line 33.
This is of course because I have not included a /h or /i value. The script
runs, but I would prefer it ran cleanly with no message.
Code is this....
# if no parameters passed, skip. If something passed, then do.
if($ARGV[0] ne ""){ do this stuff; }
Thank you!
Glenn Meyer
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs