in reply to Re: Perl Style: About error messges opening files
in thread Perl Style: About error messges opening files
I never put a newline there, the line numbers at the error message do not cause any harm. (Line numbers as there are two: one for the source file and one for <>.)
In one-liners I usually just use numbers after die:
I use numbers as they show where the error occured if there are multiple die statements in a one-liner, but they are short and easy to write. I add $! if the error really occurs and I don't know why it happened.open my $F, "<", $name or die 1;
|
|---|