Have you looked at the “BigInt API”? According to the `bigint` docs,  
integers have now become objects that you can manipulate using that API. Of  
course, there isn’t a link, but I think if you look at Math::BigInt, it’s  
probably correct. A quick look through suggests:

        $bigintparam->as_bytes()

or

        $bigintparam->numify()

might be useful?

Ricky

On Aug 28, 2018, at 1:44 PM, Greg London <[email protected]> wrote:

>         External Email - Use Caution
>
>
> I have a function in a module that I would like to receive a bigint as a
> parameter. But the first thing I want the function to do is take the
> bigint and unpack it into an array of not-bigint bits.
>
> When I use bigint, everything seems to be a bigint.
> But I'm working with some existing data structures that have to be
> simple arrays of simple integer/bits. The script calls Dumper on some data
> and saves the result to a file, which another script uses as an input. And
> I don't want to mess with that script.
>
> I've tried putting "no bigint" in different places and I keep getting
> errors of one sort or another.
>
> Any suggestions?
>
> sub myfunc{
>    my($bigintparam)=@_;
>
>    my @bitarray;
>
>    # magic.
>
>
> }
>
> _______________________________________________
> Boston-pm mailing list
> [email protected]
> http://mail.pm.org/mailman/listinfo/boston-pm


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to