in reply to Here there be cammels!

Maybe Perl's #line directive helps?

$ perl -wMstrict #line 123 "foobar.pl" warn "ACK!"; __END__ ACK! at foobar.pl line 123.

See also variable based #line directives?

Replies are listed 'Best First'.
Re^2: Here there be cammels!
by hildred (Initiate) on Feb 28, 2015 at 22:30 UTC
    #line is fun I paticularly like it in embeded scripts, but I want both line numbers.
    #!/bin/bash lineno=$LINENO;perl='#line '"$LINENO"' "'"$0"'" warn 'error'; ' perl -e "$perl"
      please reap, nonsense.