Logical Operators << Data Lists >> Arrays
The best way to describe a list in Perl/CGI is a group of data. It is a sequence of values inclosed in parentheses.

Lists are not limited to numbers. Strings may also be included ...

Scalar variables may also be used ...
Whatever value $name holds will be placed in its spot when the list is being used.

A string continaing a scalar variable may also be used ...
(1,2,"Hello $name",78)

A list may be defined as an "empty list" ...

Lists may also hold expressions ...

Shortcuts may be used in lists by using two periods.
(1..10) Represents (1,2,3,4,5,6,7,8,9,10)
(1,5,7..10) Represents (1,5,7,8,9,10)
(2.5 .. 5.5) Represents (2.5,3.5,4.5,5.5)
(-2.5 .. 1.9) Represents (-2.5,-1.5,-0.5,1.5) Notice only the starting decimal factor is used.
(a..e) Represents (a,b,c,d,e)
(a..e,1..5) Represents (a,b,c,d,e,1,2,3,4,5)

Lists may be used as arrays.
@numbers = (1..10);
Logical Operators << Data Lists >> Arrays

Advertise in the banner along the top, Click here!

Valid XHTML 1.0 Transitional Valid CSS! Text Link Ads