in reply to Timeleft subroutine

Here's another option:

use Modern::Perl; say timeLeft( 14, 30, 00 ); sub timeLeft { my ( @time, $nowScs, $thenScs ) = ( localtime(time) )[ 2, 1, 0 ]; for ( 0 .. 2 ) { $nowScs += $time[ 2 - $_ ] * 60**$_; $thenScs += $_[ 2 - $_ ] * 60**$_; } $thenScs - $nowScs; }

Output:

1203

Interesting to script, but not too readable...

Update: Added @time.