I haven’t tried this, but according to the documentation for $. ($INPUT_LINE_NUMBER), you should be able to assign a value to this which Perl will use for reporting:
> You can adjust the counter by assigning to $. , but this will not > actually move the seek pointer. (This seems to be true back to 5.6, although the documentation there is not quite as explicit.) Ricky On Oct 25, 2019, at 10:56 AM, Greg London <[email protected]> wrote: > External Email - Use Caution > > Maybe not enough caffeine this morning but > I'm trying to figure out how to change the line number reported > by perl errors. > > I am slurping in different chunks of perl code from a file > and doing an eval on them. Its working fine when it works > but if there is a error, i print out $@ which always reports > the line number from the start of the slurped text. > Which is almost entirely not helpful. > > I would like to slurp the text, prepend something that indicates > What line nukber itnshould assign to the first line, > do an eval, and afterwards, return to normal line numbers. > > Thanks. > > > > > -- > > _______________________________________________ > Boston-pm mailing list > [email protected] > https://mail.pm.org/mailman/listinfo/boston-pm The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. _______________________________________________ Boston-pm mailing list [email protected] https://mail.pm.org/mailman/listinfo/boston-pm

