The following section of perldoc discusses that: perlsyn - Plain Old Comments (Not!)
Perl can process line directives, much like the C preprocessor. Using this, one can control Perl's idea of filenames and line numbers in error or warning messages (especially for strings that are processed with eval()). The syntax for this mechanism is almost the same as for most C preprocessors: it matches the regular expression. ...
You can change the line number and filename for error and warning messages, nothing else: # line 42 "new_filename.plx"'