[sf-perl] Perl's to_date() equivalent

spidaman at arachna.com spidaman at arachna.com
Fri Sep 1 15:51:11 PDT 2006


On Fri, 1 Sep 2006, Loo, Peter # PHX wrote:
>   while ( @cur = $sth->fetchrow() ) {

I think this is a 'DBI best practices' niggling detail.

IIRC, this does a lot of copying, better to define the variables you 
want ("define" meaning use "my" ... you do 'use strict', don't you?) and 
bind the references with $sth->bind_columns(...). Particularly if you 
iterating over a big assed cursor.
-Ian

-- 
Ian Kallen <spidaman _at_ arachna _dot_ com> | Yahoo/AIM: iankallen
             http://www.arachna.com/roller/page/spidaman



More information about the SanFrancisco-pm mailing list