In Perl there is a file test operator, -p, which tells you whether or not a particular file is a named pipe.