http://www.perlmonks.org?node_id=875861


in reply to Re: Global symbol "$DBI" requires explicit package name
in thread Global symbol "$DBI" requires explicit package name

I swear on my mother's grave (well she's not dead yet, but you get the picture) that I have been using this code for years without a problem. Did something change in DBI?

Replies are listed 'Best First'.
Re^3: Global symbol "$DBI" requires explicit package name
by ikegami (Patriarch) on Dec 07, 2010 at 22:23 UTC

    This has nothing to do with DBI. You were using a variable you didn't declare ($DBI), and you asked to make such things errors by using (use strict;).

    While $DBI::errstr is also a variable you didn't declare, use strict; forgives qualified ("::") package variables.

    Although it's not documented, DBI->errstr might work. Maybe that's what you were using.

      You missed the update where he says he figured it out
        Thanks, but I didn't. I thought the post to which I replied was a followup question.