When a piece of code is required to perform the same or similar operation a number of times in succession the programmer uses a construct called a loop. This is one of the three main types of control flow in computer programming so, as an novice programmer, it is well worth your time reading up about loops in the literature.
As a rich and diverse language, Perl provides a number of different loop mechanisms. Among the simplest of these are for, while and until which have analogues in other 3rd and 4th generation languages. Becoming familiar with these basic constructs will be time well spent.
Update: improved links.
| [reply] |
| [reply] [d/l] [select] |
and then what happened?
Why can't you take the program you have, and improve it?
perlintro, Path::Tiny
| [reply] |
Yes, I am trying to improve the program, but am new to programming.If I knew how to improve the program, I would not have written the question.
| [reply] |
Yes, I am trying to improve the program, but am new to programming.If I knew how to improve the program, I would not have written the question. What are you trying exactly?
| [reply] |