On 11/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > The problem is that when I parse the valid time, I just have a number > like 0030, so if Perl's valid time is 2330, it would be an absolute > difference of 2300 according to the math but only an hour difference > in time. Is there a function to subtract zulu times when they are > just strings of 4 numbers like I have in my script?
There are many modules on CPAN for manipulating dates and times; you could convert the parsed time value into a standard time format, then subtract that. But it may be easiest for you if you break your four-digit string into hours and minutes and do the math that way. You may be able to use the % (modulus) operator to help: my $diff = ($my_hour - $their_hour) % 24; Good luck with it! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/