#!/usr/bin/perl $pi = 3.1415926; printf "%6.3f\n", $pi; # prints pi in a field 6 characters long with 3 digits after the decimal, # 3.142 (rounds up)