in reply to
Get filename of STDOUT
I have never tried out but you might find some solution in here:
filenames from filehandles
p
e
l
a
g
i
c
Comment on
Re: Get filename of STDOUT
In Section
Seekers of Perl Wisdom