On Thu, Aug 30, 2001 at 12:18:57AM -0000, mjd@plover.com wrote: > perl -le 'eval "#line 12 xyz\n1/0;"; print $@' > Illegal division by zero at xyz line 12. > > This is correct. > > perl -le 'eval "#line 12 xyz\n1/0"; print $@' > Illegal division by zero at xyz line 13. > > This wrong. It should report the error at line 12, not at > line 13. > This issue is independent of eval: perl -le '#line 12 xyz' -e '1/0' -e '' -e '' -e '' -e '' Illegal division by zero at xyz line 16. Apparently perl reports the error occuring on the line where the statement ends. (Tested with 5.005_03.) RonaldThread Previous | Thread Next