[Boston.pm] copying a bigint into an array of "normal" bits

"Greg London" <email-2Ro/Dj86MvDSUeElwK9/[email protected]> Tue, 28 Aug 2018 13:44:42 -0400
Newsgroups gmane.comp.lang.perl.perl-mongers.boston
Message-ID <[email protected]>

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.


}