in reply to how add option to my program?

See the standard Getopt::Long and Pod::Usage modules.