in reply to Re^5: Question about warnings and arrays
in thread Question about warnings and arrays
this is the code i have tried. it will write to the file, but not in an expected way. As you know i do most of my work/programs on binary files. so the data being pushed to the array will have to be written back to the file, but as byte characters/hexadecimal characters and in raw format.use File::Slurp; open ( my $file, '<', "file" ); binmode($file); my @array = read_file ("pointers"); seek ( $file, 0x67, 0 ); print $file @array[0]; foreach ( my $line(@array){ chomp ( $line ); seek ( $file, 20, 0 ); print ( $file $this ); }
and read that into an array, then try to write from the array to a raw file, it doesnt work, and looks to still write to the raw file in text mode. and if i try to binmode the array, it throws errors as expected.21 4B A8 C6
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Question about warnings and arrays
by choroba (Cardinal) on Aug 13, 2014 at 12:58 UTC | |
by james28909 (Deacon) on Aug 13, 2014 at 13:13 UTC | |
by Anonymous Monk on Aug 13, 2014 at 15:20 UTC | |
by Anonymous Monk on Aug 13, 2014 at 16:49 UTC | |
by james28909 (Deacon) on Aug 14, 2014 at 06:49 UTC |