in reply to Array of arrays & references
The backslash gives a reference to an existing array. The brackets create a new anonymous array reference that is a copy of what is between the brackets.
In your first example, you have two references to the same array. In the second example, you have two references to two different arrays.
-xdg
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
|
|---|