A.5 Statements and Blocks


Programs are composed of statements often grouped together into blocks.

A statement ends with a semicolon ( ; ), which is optional for the last statement in a block.

A block is one or more statements usually surrounded by curly braces:

 {   $thousand = 1000;   print $thousand; } 

Blocks may stand by themselves but are often associated with such constructs as loops or if statements.



Mastering Perl for Bioinformatics
Mastering Perl for Bioinformatics
ISBN: 0596003072
EAN: 2147483647
Year: 2003
Pages: 156

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net