http://qs321.pair.com?node_id=1045044


in reply to Parsing commandline with subcommands

you could use Getopt::Long and reformulate your commandline with scriptname -global -options -c "subcommand_1 -opt1 -opt2..-optn"

print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."