Originally posted as a Categorized Question.
In reply to Is it possible to get a filename from a filehandle? by Anonymous Monk