Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Dereferencing arrays
by bart (Canon) on May 31, 2008 at 20:36 UTC | |
|
Re: Dereferencing arrays
by ikegami (Patriarch) on May 31, 2008 at 20:37 UTC | |
|
Re: Dereferencing arrays
by MidLifeXis (Monsignor) on May 31, 2008 at 20:34 UTC |