in reply to problem of configration

Both previous posters make good points. That said, if you want to fix your code rather than using a module, you have another problem. Your code does not handle the rollover of hours (as it does for minutes). It can all be handled with modulo math. Here is a streamlined version of your while loop with the suggested approach to computing the new time:
while (<DATA>){ my $former_hour = substr($_, 0, 2); my $former_mn = substr($_, 2, 2); my $new_hour = ($former_hour + int($diff / 60)) % 24; my $new_mn = ($former_mn + $diff) % 60; print STDOUT "former_time is $former_hour$former_mn\n"; print STDOUT "new time is $new_hour$new_mn\n"; }
Note that I have added line feeds to the print statements.