hai monks, i want to print only from 0 to 999. if it is 0 it should print 000 if it is 12 it should print 012 if it is 2 it should print 002 the numbers may be anything between 0 to 999.But front spaces should be padded with zero or zeros
perldoc -q pad points out the [doc://sprintf] function:
my $padded = sprintf "%03s", $number;
perlmonks.org content © perlmonks.org and Corion, murugu, singam
prlmnks.org © 2006 edmund von der burg (eccles & toad)
v 0.03