in reply to Bad file descriptor error

How is the title related to the question?
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^2: Bad file descriptor error
by Corion (Patriarch) on Sep 05, 2012 at 08:19 UTC

    Oh - I completely missed that.

    The title in the question likely stems from a erroneous use of $! in the die message.

    As an explanation to the OP, please read perlvar about $!. It rightly says there:

    Many system or library calls set errno if they fail, to indicate the cause of failure.

    Using $! in situations that are not immediately after a related system call is usually wrong.