in reply to Undestanding this code snippet

perlopentut and open should give you some clues.

You can always catch errors from open like this:

open HANDLE, ... or die "Can't open: $!";

Note that $@ is only for errors from eval.