in reply to Command Prompt arguments.

For what you are doing, I recommend Getopt::Std.

In fact, this recent Code I posted uses Getopt::Std for some required and optional command-line arguments. Hope it's illustrative for you.

Edit: Added link to example code.