How you "continue the script" will depend on how far you want your "word list" to continue. The nature of your "word list" seems so basic that I wonder if you really need to store it as a file at all. What will it be used for? (And wouldn't that use be better served by writing a loop to iterate over a series of numbers, rather than reading a list of numbers from a file?)
Anyway, if your question is really "how do I create numbers with leading zeros?", the answer is sprintf (and its cousin "printf"):
my $begin = sprintf( "%03d", 0 );
my $end = sprintf( "%03d", 79 );
print "make a list that runs from $begin to $end\n";
Have fun with that.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.