- or download this
binmode (STDIN);
local $/ = undef;
...
my $parsed = &decode_record ($record);
print_record ($parsed);
}
- or download this
sub decode_record ($) {
my $record = shift;
...
return \%rec;
}
- or download this
sub parse_E ($) {
my $data = shift;
...
return $num;
}
- or download this
Argument "B<\0\0" isn't numeric in bitwise and (&) at ./testparse.pl l
+ine 47.
DEBUG: parse_E(01000010001111000000000000000000)
sign: 1 charisteristic: -64 fraction: 0.000000 = -inf
DEBUG: unpacked characteristic 0011000
DEBUG: unpacked fraction 00110000
- or download this
DEBUG: parse_E(00110001001100010011000100110001)
sign: 1 charisteristic: 2 fraction: 3.750000 = 14.062502
DEBUG: unpacked characteristic 0011011
DEBUG: unpacked fraction 001100110011100100110011