my $current = sprintf("%02d%02d%02d",$std, $min, $sek); my $past = $current - 10000; ### Beide folgenden Varianten werfen den Fehler use of unintialized value ... #$past = sprintf("0%05d", $past) if($past != /\d{6}/); #$past = "0$past" if($past !=~ m/\d{6}/); if($past =~ m/\d{6}/g) { $past = $past; } else { $past = "0$past"; } @array=qx{awk '/^$past/,/^$current/'logfile|grep ''}; ...