http://www.perlmonks.org?node_id=478525


in reply to Error location in Filter-Include

This is where your requested feature will come in handy:
use Filter::Include post => sub { $_[1] = "#line $Filter::Include::LINE $_[0]\n$_[1]"; };
So this will modify the currently filtered code to add the name of the file being included. This means that when you get the syntax error it will also include the filename the error occurred in. This code is untested, btw, so don't be surprised if it doesn't work off the bat.
HTH

_________
broquaint