|
From: Tom H. <to...@co...> - 2010-06-12 22:59:33
|
On 12/06/10 20:48, Julian Seward wrote:
> Hmm, doesn't work with the stock perl on redhat9 (prehistoric, I know,
> but certainly post-dates perl 5.005). Am I doing something wrong?
Don't you need to explicitly make $x a Math::BigInt?
> $ cat ascript.pl
> #! /usr/bin/perl
>
> use Math::BigInt;
> use strict;
>
> my $x = hex( @ARGV[0] );
I think this needs to me:
my $x = Math::BigInt->from_hex( $ARGV[0] );
> printf("result = %x %x\n", $x, $x - 0x800000);
Tom
--
Tom Hughes (to...@co...)
http://compton.nu/
|