#!/usr/bin/perl use strict; my @num = ( "000006", "00005.55", "0004.5650"); foreach (@num) { print $_, " becomes: "; print sprintf("%d\n", $_); }