chrism01 has asked for the wisdom of the Perl Monks concerning the following question:
This cannot be changed as many boxes depend already on output.$s.= pack('D',$count{$ip}{$x}{in}); $s.= pack('D',$count{$ip}{$x}{out}); $s.= pack('D',int $count{$ip}{$x}{in}); $s.= pack('D',int $count{$ip}{$x}{out}); $s.= pack('D',int $count{$ip}{$x}{inpackets}); $s.= pack('D',int $count{$ip}{$x}{outpackets});
Obviously sometimes the incoming num is too big and corruption occurs. Perldoc on tgt says:unpack('d',substr($msg,$ptr,8)); unpack('d',substr($msg,$ptr+8,8)); unpack('d',substr($msg,$ptr+16,8)); unpack('d',substr($msg,$ptr+24,8));
D A long double-precision float in the native format. (Long doubles are available only if your system supports long double values _and_ if Perl has been compiled to support those. Causes a fatal error otherwise.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Value packed as 'D', how to unpack not using 'D'?
by Roy Johnson (Monsignor) on Apr 28, 2005 at 19:41 UTC | |
|
Re: Value packed as 'D', how to unpack not using 'D'?
by Anonymous Monk on Apr 28, 2005 at 01:49 UTC | |
by chrism01 (Friar) on Apr 28, 2005 at 02:05 UTC | |
|
Re: Value packed as 'D', how to unpack not using 'D'?
by BrowserUk (Patriarch) on Apr 28, 2005 at 21:35 UTC |