Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello everyone, I need help with some options syntax. ie if I give a particular command line variable, only a particular section of the code needs to run. eg:- test -a should only run one section of the code.

Replies are listed 'Best First'.
Re: Options syntax help
by japhy (Canon) on Jun 24, 2004 at 12:50 UTC
    Well, there are many ways to deal with commandline options in Perl. Three of them are:
    1. Use the -s switch on your #! line (see perlrun)
    2. Use the standard Getopt::Std module.
    3. Use the standard Getopt::Long module.
    _____________________________________________________
    Jeff[japhy]Pinyan: Perl, regex, and perl hacker, who'd like a job (NYC-area)
    s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;