Re: Meaning of [@tempArray]
[email protected] ("John W. Krahn")
| Newsgroups | perl.beginners |
|---|---|
| Message-ID | <[email protected]> |
[email protected] wrote: > Hi there, Hello, > I am stuck with something here. > What does the following piece of code mean? > > my @temp1; Create the lexical array @temp1 and initialise it with nothing (empty.) > my @temp2; Create the lexical array @temp2 and initialise it with nothing (empty.) > $cnt=0; Assign the value 0 to the scalar variable $cnt. > $temp2[$cnt] = [@temp1]; Copy the contents of the array @temp1 to an anonymous array and assign the reference of that anonymous array to the scalar variable $temp2[$cnt]. > What is the kind of data stored in $tempFieldNames[$information] ? A scalar value of some kind. John -- Perl isn't a toolbox, but a small machine shop where you can special-order certain sorts of tools at low cost and in short order. -- Larry Wall