How to Make an Array of a Certain Size in Perl
In programming terms, an array is a variable that holds a set of information pieces in it, such as a collection of words or a collection of numbers. Each member of the array can be accessed independently at any time, which makes arrays very powerful when used for data storage. If you are creating an array in Perl, you can choose to set an upper bound on the number of items the array can hold so that you don't exceed memory storage limits.
Instructions
-
-
1
Open your Perl program in the editor of your choice.
-
2
Type "init NewVar @myArray;" on a new line.
-
-
3
Type "len.@myArray=[x];" on the next line to make the array size "x."
-
1