in reply to Re: Trimming of the decimal part.
in thread Trimming of the decimal part.

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^3: Trimming of the decimal part.
by citromatik (Curate) on Apr 23, 2008 at 15:41 UTC

    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