elsif( $Line =~ /\S+/ ) { if( $name ) { $FldEmptyLines -= $EmptyLines; } else { $FldEmptyLines++; } undef $name; $Buffer .= '%0D%0A' x $FldEmptyLines; $FldEmptyLines = 0; $Buffer .= &Ansii2Ascii( $Line ); print DBG "Varvalue:$Line\n" if $debug; $CountLines = 0; } else { $CountLines && $EmptyLines++; $FldEmptyLines++; } } } $Buffer =~ s/^&//; } close DBG if $debug; unlink $path."h".$last.".tmp"; unlink $path."h".$last.".out"; $name = $path."h".$last.".tmp"; print LARSOUT $Buffer; close(LARSOUT); rename( $name, $path."h".$last.".in" ); &Timer( 'Start' ); $gefunden = 0; while($gefunden != 1) { $name = $path."h".$last.".out"; if(open(NEUDAT, "<".$name) != 0) { $gefunden = 1; } else { exit if &Timer( 'Test' ); sleep 1; } } print "Content-type: text/html\n\n"; while() { print; } close(NEUDAT); $name = $path."h".$last.".out"; unlink $name; sub Ansii2Ascii { local( $wert ) = @_; # $wert =~ s/(.)/$map{$wert} || $wert /ge; $wert =~ s/\&/%26/g; return $wert; } sub Timer { local( $What ) = @_; if( $What eq 'Start' ) { $StartTime = time(); return 0; } elsif( $What eq 'Test' ) { return ( time() - $StartTime ) > $TimeOutMinutes * 60; } }