Hi,<br> I may ask the same old question, but just could get it. So please help me to get it done. All I want is looping through the record set for example: if I want to loop through a column, I can use this:<br> <br> my @lname;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ########################<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my $column = $c-&gt;model("myDB::Author")-&gt;get_column('last_name');<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while(my $name = $column-&gt;next){<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $lname[$i] = $name;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $i = $i + 1;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br> -----<br> but if I try:<br> my $recordset = [$c-&gt;model('myDB::Books')-&gt;search( authorid =&gt; "${authorid}" )];<br> while(my $name = $recordset-&gt;next){<br>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $lname[$i] = $name-&gt;lname;<br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $fname[$i] = $name-&gt;fname;<br>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $i = $i + 1;<br>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br> <br> &nbsp;I get error: <br> <pre wrap=""><code class="error">Can't call method "next" without a package or object reference<br><br>I know this is the error of declaration of the array and the method used to call, but did not see something similar in the docs.<br><br>Thank you<br></code></pre> <br> <p>&#32;
        



 <hr size=1>Looking for earth-friendly autos? <br> <a href="http://autos.yahoo.com/green_center/;_ylc=X3oDMTE4MGw4Z2hlBF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDZ3JlZW5jZW50ZXI-">Browse Top Cars by "Green Rating"</a> at Yahoo! Autos' Green Center.