How do I check if file is a named pipe in perl?
Kind of like:
-e /path/to/file or die "file doesn't exist";
Is i开发者_如何学Ct possible to do something like:
-p /path/to/pipe or die "not a valid pipe";
You can indeed use -p
(see perlfunc for all the filetest operators available in Perl).
精彩评论