xiaoyafeng has asked for the wisdom of the Perl Monks concerning the following question:
I believe magic pack could definitely resolve this issue perfectly. But while I've read perldoc -f pack over and over, it confused me more and more. I have no choice but post my issue and hope gurus would enlighten me.perl -e "printf(qq(%b),1024*1024*1024*1024)" #overflow! perl -e "print unpack(qq(B*), pack(qq(L), 1024*1024*1024*1024)) # dit +to perl -e "print unpack(qq(B*), pack(qq(L2), 1024*1024*1024*1024)) # di +tto
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How turn a huge decimal number to binary
by BrowserUk (Patriarch) on Sep 29, 2007 at 10:48 UTC | |
|
Re: How turn a huge decimal number to binary
by almut (Canon) on Sep 29, 2007 at 11:44 UTC | |
|
Re: How turn a huge decimal number to binary
by lidden (Curate) on Sep 29, 2007 at 19:57 UTC | |
|
Re: How turn a huge decimal number to binary
by graff (Chancellor) on Sep 29, 2007 at 18:08 UTC | |
|
Re: How turn a huge decimal number to binary (flex)
by tye (Sage) on Sep 30, 2007 at 03:53 UTC | |
|
Re: How turn a huge decimal number to binary
by xiaoyafeng (Deacon) on Sep 30, 2007 at 01:15 UTC |