The above prints next is 1 and next2 is 77 with my code. I'm trying to get the 77, of course, but I'm trying to store it in a scalar and can't seem to get it right. I'm assuming the 1 is the return code for "all good!".if ($sth->rows > 0) { $next = @{$nextimg}; print "next is $next"; print "next2 is @{$nextimg}"; }
How would I assign the scalar the value of the array?
In reply to Dereferencing arrays by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |