in reply to Skip problematic lines while populating database

You can catch fatal exceptions within block evals

There is also the cleaner module Try::Tiny

Another option is to overwrite the __DIE__ handler in %SIG

HTH

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

PS: Code ... TL;DR

Replies are listed 'Best First'.
Re^2: Skip problematic lines while populating database
by Anonymous Monk on Aug 17, 2020 at 20:41 UTC
    And this has the useful advantage of letting you know which, and how many, INSERT statements actually had problems. An exception is thrown, and you "eat" it.