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
In reply to Re^3: Trimming of the decimal part.
by citromatik
in thread Trimming of the decimal part.
by sudip_dg77
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |