in reply to Finding the name of the current file
The current input file name (if any) lives in $ARGV.
Thanks. That was it. I had tried about everything except that specific way, including re-reading perlvar(1) many times.