in reply to Problem with insert using DBI

In addition to Juerd's excellent advice,   -w and   use strict; are your friends, particularly with the code from the module, which has at least one variable lifecycle problem.

Replies are listed 'Best First'.
Re: Re: It won't insert
by dragonchild (Archbishop) on Mar 20, 2002 at 14:44 UTC
    What variable lifecycle problem did you see? I looked 3 times and didn't find any. *blinkblink*

    ------
    We are the carpenters and bricklayers of the Information Age.

    Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

      What variable lifecycle problem did you see? I looked 3 times and didn't find any.

      Look very carefully at the lifecycle(s) of $field. If you don't see the problem, consider this:

      $foo = 1; if ( 1 ) { my $foo = 2; } print "$foo\n";
      Looking at this, what would you expect it to print?

      I doubt this has anything to do with the problem you originally reported, but it is one more red flag among many raised by the code fragment you posted.

        Just as I expect, it prints '1'. *blinks some more*

        ------
        We are the carpenters and bricklayers of the Information Age.

        Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.