If you look at the docs for die it says:
If the last element of LIST does not end in a newline, the current script line number and input line number (if any) are also printed, and a newline is supplied.
And warn says "Produces a message on STDERR just like "die", but doesn't exit or throw an exception." Granted that's not explicitly saying "warn will print the current script line number and input line number unless the message ends with a newline". You might submit a documentation patch to p5p adding something like "(see the documentation for C<die> for more details)."
In reply to Re: Perl dropping " at line xxx" from warnings when "\n" is present
by Fletch
in thread Perl dropping " at line xxx" from warnings when "\n" is present
by bprew
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |