in reply to Reading command line flags into variables...?

Besides not caring about the order of arguments while using Getopt::Std or Getopt::Long, those modules also convieniently shift the command line switches out of @ARGV for you, in case you also want to provide filenames for input to '<>', or in case you have other non-switch arguments on the command line.

And they automatically consider '--' an 'end of switches' marker (Just like many unix commands), in case one of your non-switch arguments starts with a '-'.

  • Comment on Re: Reading command line flags into variables...?