Thread Offene Datei unter Windows lesen (2 answers)
Opened by bianca at 2013-10-01 22:15

FIFO
 2013-10-02 00:33
#170887 #170887
User since
2005-06-01
469 Artikel
BenutzerIn

user image
nimm zum Einlesen eines Binärfiles read():
Code (perl): (dl )
1
2
3
4
5
6
7
8
my $content = '';
my $buffer;
my $len = 65536;
open( my $fh, '<:raw', $file );

while ( read( $fh, $buffer, $len ) ) {
    $content .= $buffer;
}


Editiert von FIFO: typo , statt ;
Last edited: 2013-10-02 23:16:42 +0200 (CEST)
Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it? -- Brian Kernighan: "The Elements of Programming Style"

View full thread Offene Datei unter Windows lesen