Creating and initializing an array with list assignment : Array Item « 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 Item 
Creating and initializing an array with list assignment
    

@array = "Hello"283"there"16.439 );

# display every element of the array
$i = 0;

while $i < ) {
   print "$i   $array[ $i ]\n";
   ++$i;
}

   
    
    
    
  
Related examples in the same category
1.An array is an ordered list of scalars: strings and/or numbers.
2.Arrays: a collection of similar data elements
3.A program that prints the elements of a list.
4.Print an element in a list of variables
5.Store various type values in an array
6.Append two arrays to form another array
7.Duplicate array elements
8.Mixed Lists
9.Mixed Data Assigned to Array Cells
10.Array Elements
11.Append to array
12.Get array last element
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.