in reply to Re^2: multiple files to multiple files
in thread multiple files to multiple files

Checking for the status of the open sys calls is the most urgent thing to do.

"autodie to the rescue!" ;-)

Just add use autodie qw( open close ); to the script. It will replace the core open and close functions with wrappers that automatically check for errors.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Replies are listed 'Best First'.
Re^4: multiple files to multiple files
by Laurent_R (Canon) on Oct 18, 2015 at 09:49 UTC
    Sure, it is another nice way of doing it, less boilerplate coding. ++

    Yet, I often prefer to check it manually myself because I can customize the error message to make more sense to the users of my programs, who can then often solve their issues (e.g. missing file) by themselves, rather than having to ask me for help or log an anomaly ticket.