in reply to shift or die unless

You could also use Getopt::Long to gather your parameters. If the desired one is undefined, you could then do your date testing.