tajinderpalsingh61 has asked for the wisdom of the Perl Monks concerning the following question:
Output: [90, -20, -90, 53, 78, -38, 2, -128, 0]public class Main { public static void main(String[] args) { BigInteger n = new BigInteger("1677259342285725925376"); System.out.println(Arrays.toString(n.toByteArray())); } }
I need to do similar operation in perl, I am completely new in perl. So, no idea. Thanks in advance.
2019-08-26 Athanasius added code tags around output.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to convert bigint to bytearray in perl
by Athanasius (Archbishop) on Aug 26, 2019 at 06:26 UTC | |
by ikegami (Patriarch) on Aug 26, 2019 at 07:10 UTC | |
by tajinderpalsingh61 (Initiate) on Aug 26, 2019 at 09:03 UTC | |
by hippo (Archbishop) on Aug 26, 2019 at 09:18 UTC | |
by tajinderpalsingh61 (Initiate) on Aug 26, 2019 at 06:31 UTC | |
by haukex (Archbishop) on Aug 26, 2019 at 06:59 UTC | |
|
Re: How to convert bigint to bytearray in perl
by swl (Prior) on Aug 26, 2019 at 06:11 UTC | |
by Anonymous Monk on Aug 26, 2019 at 06:27 UTC |