in reply to Re^2: Trouble making my own open()-like routines.
in thread Trouble making my own open()-like routines.
I'd much prefer to use the three-argument version of open, but sadly, my target platform is Perl 5.005 and the three-argument version of open was introduced with 5.6.1.
I also don't want to die in the routines themselves because that would limit the amount of information in the error messages. Far better to let the caller handle it, so they can do stuff like this:
openFileForWriting($fh, 'file.log') or die "Couldn't open log file to store the crash report: $!";
|
|---|