http://www.perlmonks.org?node_id=350668


in reply to Valid tty problem

You're working way too hard. Just use the -t file test, as documented in "perlfunc".

    -- Chip Salzenberg, Free-Floating Agent of Chaos