in reply to Re^2: Hi Perlmonks, I have need to write a script to do the following
in thread Hi Perlmonks, I have need to write a script to do the following


small correction in if condition

if ($_ ge "$day $time1:time2" && $_ le "$day $time3:$time4")
  • Comment on Re^3: Hi Perlmonks, I have need to write a script to do the following

Replies are listed 'Best First'.
Re^4: Hi Perlmonks, I have need to write a script to do the following
by andreas1234567 (Vicar) on Jun 05, 2008 at 10:40 UTC
    You can't compare dates like that (meaningfully, anyway). Go search the CPAN for a suitable date module that can
    • understand your input data
    • compare dates and time
    • present dates and times in a format you prefer
    Perhaps DateTime::Format::Strptime could be useful?
    --
    No matter how great and destructive your problems may seem now, remember, you've probably only seen the tip of them. [1]