#!/usr/bin/perl use strict; my ($value) = 12345678901234567890; select (STDOUT); print "Output using sprint and %d := ", sprintf("%d", $value), "\n"; print "Output using sprint and %D (equivalent to %ld) := ", sprintf("%D", $value), "\n"; print "Output using sprint and %f := ", sprintf("%f", $value), "\n"; print "Output using sprint and %.0f := ", sprintf("%.0f", $value), "\n"; exit 0;