Construct an integer array and output its first element : Array Definition « Array « Perl

Home
Perl
1.Array
2.CGI
3.Class
4.Data Type
5.Database
6.File
7.GUI
8.Hash
9.Language Basics
10.Network
11.Regular Expression
12.Report
13.Statement
14.String
15.Subroutine
16.System Functions
17.Win32
18.XML
Perl » Array » Array Definition 
Construct an integer array and output its first element
    

@array = (123);
print $array[0];

   
    
    
    
  
Related examples in the same category
1.Define an array variable called @myList.
2.Create lists of number variables
3.Create lists of text variables
4.Arrays in Perl
5.Array literal
6.String array
7.Lists Assigned to Arrays
8.An array is a named list.
9.A program that reads data into an array and writes the array.
10.Build a string array across two lines
11.Construct a string array and output its first element
12.Define two dimensional array
13.An empty list is represented as parentheses with nothing in between
14.Using qw to construct a string array
15.Constructing and Dereferencing
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.