Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4. Control Structures

The center of any imperative programming language is control structures. Although Perl is not purely an imperative programming language, it has ancestors that are very much imperative in nature, and thus Perl has inherited those same control structures. It also has added a few of its own.

As you begin to learn about Perl's control structures, realize that a good number of them are syntactic sugar. You can survive using only a subset of all the control structures that are available in Perl. You should use those with which you are comfortable. Obey the "hubris" of Perl, and write code that is readable. But, beyond that, do not use any control structures that you do not think you need.

4.1 Blocks  
4.2 A Digression--Truth Values  
4.3 The if/unless Structures  
4.4 The while/until Structures  
4.5 The do while/until Structures  
4.6 The for Structure  
4.7 The foreach Structure  




 
 
  Published under the terms of the GNU General Public License Design by Interspire