Thread Abbruch beim Einlesen einer Datei
(3 answers)
Opened by lord_astfgl at 2007-07-06 13:51
@Sucher: Danke das war das Problem. Mit binmode funktioniert es. Nur seltsam, dass es bei dir auch ohne funktioniert hat, bei mir aber nicht (auch WinXP). Vielleicht nutzen wir unterschiedliche Versionen. Ich hab 5.6.1
nochmal zur Erklärung des Problems aus: perldoc -fbinmode Another consequence of using binmode() (on some systems) is that special end-of-file markers will be seen as part of the data stream. For systems from the Microsoft family this means that if your binary data contains "\cZ", the I/O subsystem will regard it as the end of the file, unless you use binmode(). @opi: zu Code: (dl
)
if ($res==0) {print "OK\n"; last;}; read FILEHANDLE,SCALAR,LENGTH Attempts to read LENGTH bytes of data into variable SCALAR from the specified FILEHANDLE. Returns the number of bytes actually read, "0" at end of file, or undef if there was an error. d.h. ich springe nur aus der Schleife, wenn ich am Dateiende bin.\n\n <!--EDIT|lord_astfgl|1183967849--> View full thread Abbruch beim Einlesen einer Datei |