in reply to Re: Reading command line flags into variables...?
in thread Reading command line flags into variables...?

In the example above, $firstName == '-n' and $lastName == 'Bob'. The command line flags are elements in @ARGV. Getopt::Std takes care of this for you. Also, if you are parsing the command line options by hand, you have to be aware of the order which the arguments were passed to the script.

Update: I didn't read Adam's post closely enough to notice that he was not using command line flags. My apologies.

----
Coyote

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