in reply to Problem with command-line option parsing

Since you are going to use command line options why not use the GetOpt::Long module?

-enlil

  • Comment on Re: Problem with command-line option parsing

Replies are listed 'Best First'.
Re: Re: Problem with command-line option parsing
by vek (Prior) on Jan 08, 2003 at 05:27 UTC
    Or even plain ol' Getopt::Std if you just need simple options.

    -- vek --

      ...please, please, use one of those. (I mean Getopt::Std or Getopt::Long) You will be able to pare your code down by so many lines it's amazing. The latter module allows you more flexibility and power at the price of a steeper learning curve, the former will give you rapid access to a simple means of cleanly parsing your command-line. (But you may have to sacrifice the --force in favor of a -f option.)

      ...All the world looks like -well- all the world, when your hammer is Perl.
      ---v