O'Reilly logo

Perl by Example, Fourth Edition by Ellie Quigley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. If Only, Unconditionally, Forever

If Only, Unconditionally, Forever

Control Structures, Blocks, and Compound Statements

People plan their lives by making decisions, and so do programs. Figure 7.1 is a flow chart. A flow chart is defined as a pictorial representaion of how to plan the stages of a program. It helps you to visualize what decisions need to be made to accomplish a task. According to computer science books, a good language allows you to control the flow of your program in three ways:

  • Execute a sequence of statements.

  • Based on the results of a test, branch to an alternative sequence of statements.

  • Repeat a sequence of statements until some condition is met.

Figure 7.1. A ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required