}
my ( @Date );
- my ( $f, $d );
+ my ( $f, $d, $max );
my $file = $self->{'file'};
my $files = $self->read();
$files->{$logfile} = $timestamp;
+ $max = 1;
+ foreach $f ( keys %$files ) {
+ $max = length($f) if length($f) > $max;
+ }
+ $max += 2;
+
print $p . "Schreibe Statusdatei '$file' ...\n" if verbose();
unless ( $self->test() ) {
} else {
$d = strftime( '%Y-%m-%d_%H:%M:%S', @Date );
}
- print FILE '"' . $f . '" ' . $d . "\n";
+ printf FILE "%-*s %s\n", $max, ('"' . $f . '"' ), $d;
}
close FILE;
}