|Perl: the Markov chain saw|
Within A Date Time Rangeby mumbles (Friar)
|on Jul 07, 2001 at 07:25 UTC||Need Help??|
mumbles has asked for the
wisdom of the Perl Monks concerning the following question:
(Somehow I feel this has been done before but I was unable to find it)
All I want to accomplish on an NT system is given a starting date and time and an ending date and time check if the current date and time fall within the range.
Well, it sounded simple enough when I started the adventure but soon spun into a monster that is beyond my level and now I feel I must ask for some assistance.
I think the logic is working, but it looks so different than the succinct code I see here on a daily basis. The exit() statements, among other things, seems not very perlish. Somehow it must be possible to gracefully construct this depending on a nice if/else statement or, as I fear, one ingenious line.
There has got to be a better way.
When I began this snippet from what will be my first real script (beyond "hello world") I was even looking up how to print so please take that in to consideration. By now I know very well how to print and rarely forget a terminating ";" although all those different brackets still leave me scratching my head :)
Please, all hints, suggestions, and the harshest criticism taken with the greatest appreciation. Lead me to the light...