in reply to How to give format to numbers?

I'd use sprintf:
my $num = 5.26256; my $formatted = sprintf( "%.2f", $num ); print "$formatted\n";
Phil