in reply to Re: scalar ref losing it's value?
in thread scalar ref losing it's value?
You probably want to put the rest of the code in the loop body
I thought that at first, but then I figured his query returns at most one row. Using a loop to fetch one item is very misleading. He should probably have used
ormy $dbpass = $sth->fetch; ($UIDholder, $LNholder) = @{$dbpass}; ...
my $dbpass = $sth->fetch or die("Bad data. XXX not found\n"); $sth->fetch and die("Bad data. Multiple XXX in table YYY\n"); ($UIDholder, $LNholder) = @{$dbpass}; ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: scalar ref losing it's value?
by bart (Canon) on May 05, 2006 at 07:36 UTC | |
by ikegami (Patriarch) on May 05, 2006 at 14:25 UTC | |
|
Re^3: scalar ref losing it's value?
by jck (Scribe) on May 05, 2006 at 14:12 UTC |