my $n = "0001"; print "$n\n" and $n++ for 1 .. 5; __output__ 0001 0002 0003 0004 0005