in reply to bind_columns error

"If it ain't broken, don't fix it" as the saying goes...

Are you shure that ($UIDholder, $indexmonths, $indexyears) are all references?

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

Replies are listed 'Best First'.
Re^2: bind_columns error
by jck (Scribe) on Jun 29, 2006 at 21:55 UTC
    i declared them all at the top with use vars:
    use vars qw/ %in $dbh $sql $sth $UIDholder $indexmonths $indexyears @U +IDarray @montharray @distinctmontharray @yeararray @distinctyeararray + $q $rv $postmonth $postyear $monthnumber $postby $title $teaser @AoT +itle @AoTeaser $content $postdate/;

    isn't that enuf?

      No. Declaring them makes them suitable for use, but only if they are assigned something, they hold something: a scalar, reference, whatever. The error message tells you of not being enough references at some line, so you should check if the variables in question in fact hold references at that point. This can be done with the operator ref.

      --shmem

      _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                    /\_¯/(q    /
      ----------------------------  \__(m.====·.(_("always off the crowd"))."·
      ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}