Maybe you should provide an example because I'm not sure I understood quite well. But if you read the documentation on #line directives you'll see that you do not have to provide a filename. It's not expressed as such, but it is said that the #line syntax matches the regex:
where the last ? shows that the filename can indeed be omitted./^\# \s* line \s+ (\d+) \s* (?:\s("?)([^"]+)\g2)? \s* $/x
So just don't put it there, and it won't be fixed to any value.
I'd still advise you to post a broader description of your problem (why, and how are you generating perl code?) because it somehow seems like you're doing something wrong (reading from and writing to files without being able to track line numbers shouldn't happen with Perl). Are you sure you can't just have your additions to the code in separate files and do them, to let Perl keep track of files and lines for you?
In reply to Re: Reset the effect of #line
by Eily
in thread Reset the effect of #line
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |