I
ifiaz
The following program run:
($field1, $field2, $field3, $field4, $field5) = unpack("A4 A1 A3 A1
A*", "this is v strange");
print "|$field1|\n";
print "|$field2|\n";
print "|$field3|\n";
print "|$field4|\n";
print "|$field5|\n";
and the result is this:
|this|
||
|is|
|v|
| strange|
But, I expect a space for $field2 i.e. | |
Why $field4 can print with a single character and
$field2 can't. Am I missing something?
($field1, $field2, $field3, $field4, $field5) = unpack("A4 A1 A3 A1
A*", "this is v strange");
print "|$field1|\n";
print "|$field2|\n";
print "|$field3|\n";
print "|$field4|\n";
print "|$field5|\n";
and the result is this:
|this|
||
|is|
|v|
| strange|
But, I expect a space for $field2 i.e. | |
Why $field4 can print with a single character and
$field2 can't. Am I missing something?