Loops and Control Structures / Now you try: Loops
Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com’s entire library of video tutorials.
Learn More
Subtitles of the Movie
Now we looked at some of these loops in the context of Perl scripting, I am going to set to you a couple of exercises which you can feel free to do or ignore or exactly as you please. The answers as always to these exercises are found within the examples directory, on the CD. First task is to add five to each element of an array of numbers. And of course to show each element as it goes. Then show the months of the year and then show them in reverse. Once again the point here is not to stack a whole list of 24 print statements, but rather to use the techniques we've discovered in this particular chapter. Finally the last exercise is to take the number 2, and then keep doubling it and display the result, until it exceeds the number 1000.
Tutorial Information
| Course: | Perl Fundamentals |
| Author: | Joshua Mostafa |
| SKU: | 33403 |
| ISBN: | 1-9320-7215-2 |
| Release Date: | 2002-12-19 |
| Duration: | 7.5 hrs / 113 lessons |
| Work Files: |
Yes |
| Captions: | For Online University members only |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |
VTC Sign up & Benefits
- Unlimited Access
- 98,729 Video Tutorials (23,265 free)
- Video Available as Flash or QuickTime
- Over 1026 Courses
- $30 for One Month Access
- Multi-User Discounts Available
United States 