theantler has asked for the wisdom of the Perl Monks concerning the following question:
But ... what does this do:my @array = (1, 2, 3); just an array my $ref = \@array; get the ref to the array my $ref = [1, 2, 3]; make an anonymous array and get the ref
and ..$xxx = [ @array ]; huh??? Hey I think I found out: we mke a copy of th +e array in an anonymous and get the ref to it.
</code>@$array = (1, 2, 3); what?!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Four or five ways we can make or break an array?
by BrowserUk (Patriarch) on Mar 20, 2010 at 12:45 UTC | |
by theantler (Beadle) on Mar 20, 2010 at 12:57 UTC | |
|
Re: Four or five ways we can make or break an array?
by ikegami (Patriarch) on Mar 20, 2010 at 17:00 UTC | |
|
Re: Four or five ways we can make or break an array?
by CountZero (Bishop) on Mar 20, 2010 at 17:20 UTC | |
|
Re: Four or five ways we can make or break an array?
by biohisham (Priest) on Mar 20, 2010 at 17:08 UTC |