thank you for your help. That's exactly what I want to do. <br> <br> regards<br><br><b><i>Boris Ĉeraniĉ <zextra@gmail.com></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> On 12/02/07, Will Smith <willbelair @yahoo.com=""> wrote:<br>> Hi,<br>> I may ask the same old question, but just could get it. So please help me<br>> to get it done. All I want is looping through the record set for example: if<br>> I want to loop through a column, I can use this:<br>><br>> my @lname;<br>> ########################<br>> my $column =<br>> $c->model("myDB::Author")->get_column('last_name');<br>> while(my $name = $column->next){<br>> $lname[$i] = $name;<br>> $i = $i + 1;<br>> }<br>> -----<br>> but if I try:<br>> my $recordset = [$c->model('myDB::Books')->search(<br>> authorid
=> "${authorid}" )];<br>> while(my $name = $recordset->next){<br>> $lname[$i] = $name->lname;<br>> $fname[$i] = $name->fname;<br>> $i = $i + 1;<br>> }<br>>...<br>><br>> Thank you<br>><br><br>You should have placed $recordset in foreach, like this:<br><br>my $recordset = [ something that returns list in list context ];<br><br>foreach my $name ( @$recordset ) {<br>...<br>}<br><br>_______________________________________________<br>List: Catalyst@lists.rawmode.org<br>Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst<br>Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/<br>Dev site: http://dev.catalyst.perl.org/<br></willbelair></blockquote><br><p> 
<hr size=1>TV dinner still cooling?<br><a href="http://us.rd.yahoo.com/evt=49979/*http://tv.yahoo.com/">Check out "Tonight's Picks"</a> on Yahoo! TV.