in reply to Re: Spliting an mbox file
in thread Spliting an mbox file

open OUT, $out || die "Can't open $out!\n";
Using the high precedence || operator means that the dies are superfluous. You should use the low precedence or operator instead. .

Or, use parentheses if one wants to use '||' ...

open( OUT, $out ) || die "Can't open $out: $!\n";