in reply to Re^2: how to make -h optional in GetOpt::Long
in thread how to make -h optional in GetOpt::Long

but keeping every thing aside. how do u make a switch optional in GetOpt::Long? in STD you use a semi colon to denote that the switch is optional what do u do in Long? what if i have more than 2 switches which are optional? how do i express them as optional in Long?
  • Comment on Re^3: how to make -h optional in GetOpt::Long

Replies are listed 'Best First'.
Re^4: how to make -h optional in GetOpt::Long
by ikegami (Patriarch) on Jun 02, 2005 at 06:25 UTC
    All switches are optional. (On that subject, the docs say "That's why they're called 'options'.") If you don't want a switch to be optional, you have to explicitely check to make sure a value was supplied, after calling GetOptions.