Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: looping efficiency

by Your Mother (Archbishop)
on Dec 30, 2020 at 00:22 UTC ( [id://11125957]=note: print w/replies, xml ) Need Help??


in reply to looping efficiency

(s)?printf will do what you want without difficulty–

perl -e 'printf "%04d\n", $_ for 0 .. 9999'

Update, swapped the 1 for a 0.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11125957]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-03-29 00:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found