for my $i (map { sprintf("%05d", $_) } 0..31) { # nu kannst du $i verarbeiten }