Raymond Wan wrote:
Alan Haggai Alavi wrote:
On 8 April 2010 11:00, Raymond Wan wrote:
for (my $i = 0; $i < length ($buffer); $i += 4) {
print unpack ('I', $buffer[$i].$buffer[$i + 1].$buffer[$i +
2].$buffer[$i +
3]), "\n";
}
Wildcards can be used within the template in pack. There is no
Hi John/Philip,
Thank you both for your comments -- I have to admit that this wasn't something that I thought about
but it should have been. I'm sure as I progress, this would have been an annoying bug to locate...
Thank you for saving me some stress! :-)
Ray
John W. Krahn wrote:
Philip
On 8 April 2010 11:00, Raymond Wan wrote:
>
> Hi all,
>
> I would like to read in a binary file and extract the 4-byte ints from it.
> Under Linux, something like "od -t uI". I got it working as follows:
>
>
> my $buffer = ;
> my @buffer = split //, $buffer;
> for (my $i = 0; $i < length ($buffe
Philip Potter wrote:
On 8 April 2010 06:30, Raymond Wan wrote:
I would like to read in a binary file and extract the 4-byte ints from it.
Under Linux, something like "od -t uI". I got it working as follows:
my $buffer = ;
my @buffer = split //, $buffer;
for (my $i = 0; $i < length ($buffer
On 8 April 2010 06:30, Raymond Wan wrote:
>
> Hi all,
>
> I would like to read in a binary file and extract the 4-byte ints from it.
> Under Linux, something like "od -t uI". I got it working as follows:
>
>
> my $buffer = ;
> my @buffer = split //, $buffer;
> for (my $i = 0; $i < length ($buffe
Hi Alan,
Alan Haggai Alavi wrote:
On 8 April 2010 11:00, Raymond Wan wrote:
for (my $i = 0; $i < length ($buffer); $i += 4) {
print unpack ('I', $buffer[$i].$buffer[$i + 1].$buffer[$i + 2].$buffer[$i +
3]), "\n";
}
Hi Raymond,
Wildcards can be used within the template in pack. There is no