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."
In Section
Seekers of Perl Wisdom