wo er recht hat, hat er recht :)
D:\Eigene Dateien\Entwicklung\RFC>perl
sub clock {
my $minutes = shift;
my $sign = ($minutes >= 0);
my $hh = int($minutes/60);
my $rest = abs($minutes - $hh*60);
return sprintf ("%s%d:%02d", ($sign ? '' : '-'), $hh, $rest);
}
$jobsum=0;
$skalars{'stdtime'}=440;
print "Überstunden = ".clock($jobsum-$skalars{'stdtime'});
^Z
Überstunden = --7:20
bugfix:
sub clock {
my $minutes = shift;
my $hh = int($minutes/60);
my $rest = abs($minutes - $hh*60);
return sprintf ("%d:%02d", $hh, $rest);
}