Array Variable in Perl
What is an array?
The Array is nothing but a collection of elements, grouped under a single variable name.
@arrayname = ("value1", value2");
print "content-type: text/htmlnn";
@colors = ();
@name = ( "alan", "jack");
$colors  = red;
$colors  = green;
$colors  = blue;
In the above example, if the elements are strings, then it is enclosed within quotes, and each element in an array can be accessed by providing the index value which starts from 0 to one less than the total number of elements. Perl indexes array elements as scalar variable.