in reply to Re: Unpack weirdness
in thread Unpack weirdness

I do get the same results for 5.6.0 and 5.7.2, but if I go further back in time, I get different results. Note that 2 ** 32 is bigger than what fits in a 32 bit integer, so it could matter whether your version of Perl stores the value in an 64 integer, or a double.

What follows are result of

print unpack "w*", pack "w*", 2 ** 32;

of all versions of Perl since 5.003_07 (the first version that produces any output).

Abigail

5.003_07:               4294967296
5.003_08:               4294967296
5.003_09:               2082940340915322970 
5.003_10:               2082940208078290   
5.003_11:               2082940208083090   
5.003_12:               2082940340923187290 
5.003_13:               2082940340931051610 
5.003_15:               2082940208089490    
5.003_16:               2082940208086290 
5.003_17:               2082940208086290 
5.003_18:               2082940208087890
5.003_19:               2082940340931051610
5.003_20:               2082940208084690 
5.003_21:               2082940208084690 
5.003_22:               2082940340915322970
5.003_23:               2082940340928430170 
5.003_24:               2082940208084690
5.003_25:               2082940340928430170 
5.003_26:               2082940340928430170
5.003_27:               2082940340925808730
5.003_28:               2082940208086290
5.003_90:               2082940208086290
5.003_91:               2082940208083090
5.003_92:               2082940340923187290
5.003_93:               034340878134233984
5.003_94:               033816591134233984
5.003_95:               0206415134233984
5.003_96:               0348651673216256
5.003_97:               91606559276987514970
5.003_97a:              91605855589545738330
5.003_97b:              91605855589550981210
5.003_97c:              91605855589543116890
5.003_97d:              55911777093235090
5.003_97e:              55911777093228690
5.003_97f:              91605855589550981210
5.003_97g:              55911777093231890  
5.003_97h:              55911777093223890  
5.003_97i:              91605855589543116890
5.003_97j:              55911777093223890   
5.003_98:               55912206589955090   
5.003_99:               55912206589963090
5.003_99a:              55911777093227090
p54rc1:                 91606559276984893530
p54rc2:                 55912206589964690  
5.004:                  55912206589964690
5.004_01-t2:            55911777093225490
5.004_01:               55912206589955090  
5.004_01_01:            91605855589553602650
5.004_01_02:            91605855589540495450
5.004_01_03:            91605855589537874010
5.004_02:               91606559276979650650
5.004_02_01:            91605855589543116890
5.004_03-t2:            91605855589556224090
5.004_03:               55912206589958290
5.004_04-t1:            01224420512503971712
5.004_04-t2:            01224420512503971712
5.004_04-t3:            01224420512503971712
5.004_04-t4:            020950120150
5.004_04:               02095088150
5.004_04-m1:            020480226508672 
5.004_04-m2:            020480226508672
5.004_04-m3:            020480226508672
5.004_04-m4:            020480226508672
5.004_05-MT5:           020480226508672
5.004_05-MT6:           020480226508672  
5.004_05-MT7:           020480226508672  
5.004_05-MT8:           020480226508672
5.004_05-MT9:           020480226508672    
5.004_05:               020480260063104    
5.004_50:               91606559276995706980
5.004_51:               91606559276977356900
5.004_52:               91606559276990464100
5.004_53:               0209502621590
5.004_54:               02095080150
5.004_55:               02095064150
5.004_56:               0209505243030
5.004_57:               021041618350240  
5.004_58:               0348651681310880 
5.004_59:               0353894566553760   
5.004_60:               0348651681310880
5.004_61:               034340880226508672  
5.004_62:               020490260063104
5.004_63:               1121361510010
5.004_64:               1220721510010
5.004_65:               1220521610010
5.004_66:               1221001610010
5.004_67:               1221001610010
5.004_68:               1221001610010
5.004_69:               123545499210010
5.004_70:               1220681610010
5.004_71:               1221321610010
5.004_72:               123440641610010 
5.004_73:               1221321610010  
5.004_74:               1220681610010  
5.004_75:               123388212810010
5.004_76:               123532392010010
5.005:                  123401320010010  
5.005_01:               123453748810010  
5.005_02-T1:            123506177610010
5.005_02-T2:            1221401610010      
5.005_02:               1221081610010      
5.005_03-MT1:           123558606410010
5.005_03-MT2:           1221721610010
5.005_03-MT3:           123401320010010
5.005_03-MT4:           123506177610010
5.005_03-MT5:           123506177610010
5.005_03-MT6:           1221401610010
5.005_03:               123401320010010
5.005_50:               1221641610010    
5.005_51:               122049010010
5.005_52:               12342753451966250  
5.005_53:               03558606515073460
5.005_54:               03486517036180
5.005_55:               20828190104180 
5.005_56:               2082819017039540
5.005_57:               2082819017039540
5.005_58:               02140208077100
5.005_59:               02140208077100
5.005_60:               02140208077100
5.005_61:               02140208077100
5.005_62:               4294967296
5.005_63:               4294967296   
5.5.640:                4294967296   
5.5.650:                4294967296
5.5.660:                4294967296     
5.5.670:                4294967296     
5.6.0-RC1:              4294967296
5.6.0-RC2:              4294967296
5.6.0-RC3:              4294967296
5.6.0:                  4294967296
5.6.1-TRIAL1:           4294967296
5.6.1-TRIAL2:           4294967296         
5.6.1-TRIAL3:           4294967296         
5.6.1-foolish:          4294967296
5.6.1:                  4294967296   
5.7.0:                  4294967296
5.7.1:                  4294967296
5.7.2:                  4294967296
5.7.3:                  4294967296   
@16151:                 4294967296
@16190:                 4294967296       
@16827:                 4294967296

Replies are listed 'Best First'.
Re: Re: Unpack weirdness
by ignatz (Vicar) on May 30, 2002 at 18:52 UTC
    Just out of curiousity, could you go into the set up that produced these results? I'm imagining something in which you just type a few simple commands on a script and blammo.
    ()-()
     \"/
      `                                                     
    
      I just typed in:
      ~/Perl/runall /tmp/pack.pl
      and that would run the program /tmp/pack.pl on all versions released of Perl since 5.000. But I'm working on going back all the way to 1.000.

      Abigail