in reply to Re: Combining two scripts with a command line switch?
in thread Combining two scripts with a command line switch?

You guys are the best - that worked! Thanks!

One more quick question, how do I set it so that an argument is required? Right now I have:
my ($read,$generate,$help); # option switches GetOptions ( "help" => \$help, "read" => \$read, "generate" => \$generate, );

If I run the it with any switch, it works perfectly - run it with no arguments, it does nothing at all. :) I'd like to add one more switch for a blank variable, so I can toss in a string that says "type -help for usage'."

Thanks very much as always!

Replies are listed 'Best First'.
Re^3: Combining two scripts with a command line switch?
by Joost (Canon) on Dec 13, 2004 at 18:18 UTC
Re^3: Combining two scripts with a command line switch?
by rev_1318 (Chaplain) on Dec 14, 2004 at 11:13 UTC
    how about:
    my ($read,$generate,$help); # option switches GetOptions ( "help" => \$help, "read" => \$read, "generate" => \$generate, ); die "$Usage\n" unless $read || $generate;
    Paul