use bigint.pm $File1=">xyz.txt"; OPEN File1; ### calculations.... #### print(File1 ,@array);### @array having 20 and more digits of scalars close File1;