in reply to Writing the elements of an array to a file
print {$FILE} pack 'C4', @arr;
You should have thought of a loop at least:
print {$FILE} pack 'C', $_ for @arr;
Update: If you need pack, the array doesn't contain binary data. It contains the numbers.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Writing the elements of an array to a file
by bontchev (Sexton) on Aug 31, 2015 at 15:46 UTC | |
by Athanasius (Archbishop) on Aug 31, 2015 at 15:56 UTC | |
by AnomalousMonk (Archbishop) on Aug 31, 2015 at 17:22 UTC | |
by choroba (Cardinal) on Aug 31, 2015 at 15:55 UTC |