in reply to Re^2: DBI: pass $dbh from a sub
in thread DBI: pass $dbh from a sub

But I avoided "die" because I don't want my program to end at that point; doesn't "die" exit the program?

Replies are listed 'Best First'.
Re^4: DBI: pass $dbh from a sub
by runrig (Abbot) on Jul 29, 2004 at 20:44 UTC
    ...doesn't "die" exit the program?
    Not when it is in an eval block. eval is perl's way of "trying" a block of code, and die is like throwing an exception, and checking $@ afterward is like catching the exception.
      OIC!
      So an eval is like its own little segregated program space?