Fatal provides a way to conveniently replace functions which normally return a false value when they fail with equivalents which raise exceptions if they are not successful. This lets you use these functions without having to test their return values explicitly on each call. Exceptions can be caught using eval{}. See perlfunc and perlvar for details.

The do-or-die equivalents are set up simply by calling Fatal's import routine, passing it the names of the functions to be replaced. You may wrap both user-defined functions and overridable CORE operators (except exec, system, print, or any other built-in that cannot be expressed via prototypes) in this way.

If the symbol :void appears in the import list, then functions named later in that import list raise an exception only when these are called in void context--that is, when their return values are ignored. For example

The use of :void is discouraged, as it can result in exceptions not being thrown if you accidentally call a method without void context. Use autodie instead if you need to be able to disable autodying/Fatal behaviour for a small block of code.

You've tried to use Fatal on a Perl built-in that can't be overridden, such as print or system, which means that Fatal can't help you, although some other modules might. See the "SEE ALSO" section of this documentation.