Posted on 1998-07-17
I'm reading a manual on sybperl, a sybase module for perl. One function returns a reference to a static array (a row from the database) and this reference is stored in $d.
The manual says that to copy the array into a list of arrays, I need to do something like:
push(@rows, [@$d]) ;
My understanding is that the @ dereferences $d, while the  create a reference to the list.
How and why does the procedure above create a copy of the array that $d references instead of just referencing the same thing? In other words, why is [@$d] not the same thing as $d?