S
Shaun Jackman
Running the following little bit
$header = pack "V12 v6 V6 v8", @fields;
print length $header;
prints
100
However, the following
$header = pack "V12 v6 V6 v8", @fields;
print $header;
then (where foo is the above script)
./foo | wc -c
prints
107
Where did the extra 7 characters come from? I'm very confused. Why does the
length of the $header report 100, but 107 characters get printed? Do I have
to set STDOUT to a binary stream somehow?
Please cc me in your reply,
Thanks,
Shaun
$header = pack "V12 v6 V6 v8", @fields;
print length $header;
prints
100
However, the following
$header = pack "V12 v6 V6 v8", @fields;
print $header;
then (where foo is the above script)
./foo | wc -c
prints
107
Where did the extra 7 characters come from? I'm very confused. Why does the
length of the $header report 100, but 107 characters get printed? Do I have
to set STDOUT to a binary stream somehow?
Please cc me in your reply,
Thanks,
Shaun