Training, Open Source computer languages

PerlPHPPythonMySQLhttpd / TomcatTclRubyJavaC and C++LinuxCSS

Search our site for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
Please visit
http://www.wellho.net/picture/board1.html
for the latest update to this page
While and for, last, next and redo

While and for, last, next and redo

Although (technically) you can get by with just "while" and "if" constructs for flow control in Perl, the language offers a wide variety of alternatives. This example, taken from the board during a Perl class, shows how the while loop can be replaced by the for loop which is easier to write and maintain if you want to repeat a block of code a certain number of times. On this Perl course, we also used the same diagram to illustrate Perl's last, next and redo statements. If you attend one of our introductory Perl courses, we'll cover for and while, next last and redo as part of th fundamentals of the language; our groups sizes are small, and if we have anyone with prior programming experience in a language such as C, Java or PHP we'll also compare last to break, next to continue, and we'll talk about redo which has no direct equivalent.

Associated topic - PHP - Control Statements

Next ... random image ... a slide show ... image from list below



WELL HOUSE CONSULTANTS LTD.: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 0800 043 8225 or 01225 708225 • FAX: 0845 8382 405 or 01225 707126 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho