in reply to Split int into segments of max int 26
Am I missing something?
Something like this?
while ($n) { $i = $n % 26; unshift @vector, $i; $n -= $i; $n /= 26; } print map { chr(64+$_) } @vector;
Untested!
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Split int into segments of max int 26
by thanos1983 (Parson) on Sep 13, 2017 at 07:40 UTC |