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 (t...@compton.nu)
http://compton.nu/

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to