in reply to Re^2: 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
Hope this helps!
citromatik
|
|---|