in reply to How do I find out if STDIN or STDOUT are attached to a pipe?

The -p file test should work fine on stdin, viz:
$ sleep 1 | /usr/bin/perl -le 'print -p STDIN' 1 $ /usr/bin/perl -le 'print -p STDIN' < /dev/null $ /usr/bin/perl -v This is perl, version 5.005_03 built for sun4-solaris...
The same thing happens with a 5.6 binary I have.