In this particular case just print is ok:
D:\>perl -le "$_=23232363283842;print" 23232363283842
But this doesn't:
D:\>perl -le "$_=23232363283842232;print" 2.32323632838422e+016
and in such case I would try to split to groups of digits:
$_=23232363283842232; while($_) { unshift @a, sprintf"%06d", $_%1e6; $_=int($_/1e6); } $a[0]%=1e6; print@a Result: D:\>perl -le "$_=23232363283842232;while($_) { unshift@a,sprintf\"%06d +\",$_%1e6; $_=int($_/1e6); } $a[0]%=1e6;print@a" 23232363283842232
Update: It will work correctly for 0, but for negative integers one must change the input int to opposite and store the minus sign in variable to print it later.
$sign=""; if($_<0) { $_=-$_; $sign="-"; } ...and at the end print $sign,@a
In reply to Re: how to format cell as text?
by grizzley
in thread how to format cell as text?
by poolboi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |