Re: Meaning of [@tempArray]
[email protected] ("Jeff Peng")
| Newsgroups | perl.beginners |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Jun 12, 2008 at 5:28 PM, [email protected] <[email protected]> wrote: > Hi there, > > I am stuck with something here. > What does the following piece of code mean? > > my @temp1; > my @temp2; > $cnt=0; > $temp2[$cnt] = [@temp1]; > > What is the kind of data stored in $tempFieldNames[$information] ? > Hi, [@temp1] means creating an anonymous array. This anonymous's elements are the ones of @temp1. An anonymous array is a scalar, this scalar is assigned to $temp2[$cnt]. -- Jeff Peng - [email protected] Professional Squid supports in China http://www.ChinaSquid.com/