in reply to Re^5: [pack]little endian timestamp to decimal value
in thread [pack]little endian timestamp to decimal value

I'm not joking!
I now tried it on 5 different machines with different Perl versions.

1 PowerPC (PowerBook G4, running Gentoo Linux) Perl 5, version 12, subversion 2 (v5.12.2)
1 PowerPC (PowerMac G4, running Gentoo Linux) Perl v5.8.8 built for powerpc-linux
1 PowerPC G5 (PowerMac G5, running OS X 10.5) Perl v5.8.9 built for darwin-2level
1 Dual Xeon (MacPro running OS X 10.6) Perl v5.8.9 built for darwin-2level
1 Dual Xeon (Dell hardware Fedora Core 7) Perl v5.8.8 built for i386-linux-thread-multi


And on all the PowerPCs I get as return: "3059448640"
And on all the Intels I get as return: "1081826230"


(Just to be clear: I tried running the code from the same share. And I typed it in all over.)
#!/usr/bin/perl -w print unpack "L", pack "H*", "B65B7B4000";
The great mistake is to anticipate the outcome of the engagement; Let nature take it's course, and your tools will strike at the right moment.

Replies are listed 'Best First'.
Re^7: [pack]little endian timestamp to decimal value
by choroba (Cardinal) on Oct 27, 2010 at 09:57 UTC
    Where has the < sign hidden?
Re^7: [pack]little endian timestamp to decimal value
by ikegami (Patriarch) on Oct 27, 2010 at 16:43 UTC
    That's not the code I provided.
      I think I'm getting retarded. :S

      You are right. That was not the code.
      I now tried it with this:
      #!/usr/bin/perl -w $le_ts = "B65B7B4000"; print unpack "L<", pack "H*", $le_ts;
      It now runs on all architectures.
      The great mistake is to anticipate the outcome of the engagement; Let nature take it's course, and your tools will strike at the right moment.