in reply to Re: Trimming of the decimal part.in thread Trimming of the decimal part.
Yes, you can, pass the array to sprintf and format each element accordingly:
perl -e '@x=qw(I have 100.01);$r=sprintf "%s %s %d\n",@x;print $r' I have 100 [download]
Hope this helps!
citromatik