sparky8342 has asked for the wisdom of the Perl Monks concerning the following question:
Output:#!/usr/bin/perl sub extract { my($i,$y) = @_; print "Unpack $i: " . (join ',',unpack('w*',$y)) . "\n"; } $x=4294967296; foreach(1..9) { $z=pack('w*',$x); &extract($_,$z); }
Unpack 1: 2082839,9,0,0,0 Unpack 2: 34126102543,0,0,0 Unpack 3: 34126037007,0,0,0 Unpack 4: 34126037007,0,0,0 Unpack 5: 34126037007,0,0,0 Unpack 6: 34126037007,0,0,0 Unpack 7: 34126037007,0,0,0 Unpack 8: 34126037007,0,0,0 Unpack 9: 34126037007,0,0,0This only happens once $x >= 4294967296
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Unpack weirdness
by jmcnamara (Monsignor) on May 30, 2002 at 14:49 UTC | |
by Abigail-II (Bishop) on May 30, 2002 at 15:29 UTC | |
by ignatz (Vicar) on May 30, 2002 at 18:52 UTC | |
by Abigail-II (Bishop) on May 30, 2002 at 18:56 UTC |