in reply to Changing the value of a BigInt?

Thanks for the replies so far.

The thing I was trying to avoid was doing "new" each time I want to jam a different hex value into $strtcnt and $endcnt.
Basically these three vars live the whole time the program is running, so I was hoping to have a way to say:
$strtcnt = next_hex_val;
without doing "new" but maybe new isn't what is causing slowness.

Replies are listed 'Best First'.
Re: Re: Changing the value of a BigInt?
by ysth (Canon) on May 13, 2004 at 05:46 UTC
    Then you want to tie it; something like:
    { package Tie::AutoBigInt; use Tie::Scalar; use base "Tie::StdScalar"; sub STORE { $_[0]->SUPER::STORE(new BigInt $_[1]) } } tie $strtcnt, "Tie::AutoBigInt";