in reply to Re: A hash of lists
in thread A hash of lists
Even though it isn't exactly the same as \@test, for your purposes it works the same.
It's doubtful that his real purposes are anything like the example he showed, so the differences between [ @test ] and \@test may actually be quite significant.
The first, [ @test ] actually creates a new array, a copy of @test, and returns a reference to it. The second, \@test returns a reference to @test itself.
If @test is big, making copies of it could hurt performance.
Also, because the data is copied, changing an element in the array referred to by [ @test ] won't have any affect on the contents of @test itself. Sometimes that's just what you want. Sometimes it isn't.
-sauoq "My two cents aren't worth a dime.";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: A hash of lists
by wolis (Scribe) on Nov 06, 2003 at 22:42 UTC | |
by jweed (Chaplain) on Nov 06, 2003 at 23:09 UTC | |
by QM (Parson) on Nov 06, 2003 at 23:41 UTC |