in reply to Re: How come no DBI error??
in thread How come no DBI error??

hey!

okay when I tried adding $! = 1; it started to print out error statements...then i realized my problem was i didn't install a mysql driver for dbi. then once i did, it was fine...but then I deleted the $! = 1; and it still prints error and works fine?

Should I leave the $! = 1; in the script or does it not matter now?
thanks

Replies are listed 'Best First'.
Re^3: How come no DBI error??
by davidrw (Prior) on Apr 16, 2005 at 13:34 UTC
    Are you adding $|=1 or $!=1 ? Setting $! is actually setting an error code. $|=1 is what was suggested--what that does (see perlvar man page) is set it to autoflush any output, so you're assured it goes to the screen immediately. otherwise, you could potentially have code like (i've had this happen in c way more than in perl) this, but you never see "hi":
    do_stuff(); print "hi"; do_something_that_fatally_errors();
Re^3: How come no DBI error??
by CountZero (Bishop) on Apr 16, 2005 at 09:18 UTC
    What errors do you get and the script still works fine?

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law