in reply to Re^2: variable based #line directives?
in thread variable based #line directives?

The #line directive takes hold only for the code compiled within the eval string. So you can only "set" the line number by doing

my $code = <<CODE; #line 200 die "Hello world"; CODE eval $code; warn $@; __END__ Hello world at (eval 1) line 200.