__LINE__ aside, you could use warn (with a suitably redirected STDERR or $SIG{__WARN__}) with no trailing newline and Perl will add the location for you.
In reply to Re: Determining a line number the error occurs on
by Fletch
in thread Determining a line number the error occurs on
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |