in reply to unshift with two-dimensional arrays
You may be surprised to learn that @a=([0,1,2]); creates an array with one element in it. The first scalar in @a is an arrayref. that array ref has three elements.
You probably want to do unshift @a, [1]. Now @a is an array with two elements in it. Both are scalary array refs.
See perlref for all the magic. I used to read that page quite often (probably twice a year or more).
-Paul
|
|---|