There's two answers to this, and it depends on what you're really trying to accomplish. If this is homework/you learning about Perl and computer programming, then you'd be best served to spend the time figuring out how to solve problems like this. The first, and hardest, part of solving problems with a computer is to explain clearly what you need to do. In this case, it's pretty clear that there's a series of steps a human goes through to determine that 12:45 is 65 minutes before 01:50--if you can figure out what those steps are, then you can then convert those steps into code that the computer understands.
If, on the other hand, this is something for work, and you just need it done *now*, you should check CPAN and or what you have locally available for modules that handle time conversion. I'm pretty sure Time::Local is good enough, but there are probably better ones available.
If you gave more context for your problem, it would be easier to give you a more specific answer. Also, please tell us (actually, *show* us) what you've already tried.
In reply to Re: time diff in minutes
by ssandv
in thread time diff in minutes
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |