LPM: DBI woes

Mik Firestone fireston at lexmark.com
Fri Feb 25 07:54:05 CST 2000


On Fri, 25 Feb 2000, Joe Hourcle wrote:

> 
> If it's returning an array ref, can't you just do:
> 
> 	($day) = $sth->fetch;
> 
> (I'd look up how I normally do things, but I don't have my normal access
> right now)
> 
I do not think that will do what you think it will.  $str->fetch returns a
reference - which is a scalar thingy.  You are trying to coerce a scalar into
a list context and I believe the perl docs explicitly state the results are
undefined.  Without a great deal of testing, I think $sth->fetch->[0] would
work.  Still doesn't solve Rich's problem, though.

Mik
-- 
Mik Firestone fireston at lexmark.com
When I become an Evil Overlord:
Shooting is _not_ too good for my enemies.





More information about the Lexington-pm mailing list