如何检查文件是否是perl中的命名管道?

n0p*_*0pe 1 perl file named-pipes fifo

有一些像:

-e /path/to/file or die "file doesn't exist";
Run Code Online (Sandbox Code Playgroud)

有可能做这样的事情:

-p /path/to/pipe or die "not a valid pipe";
Run Code Online (Sandbox Code Playgroud)

Pla*_*ure 5

您确实可以使用-p(有关Perl中可用的所有文件测试运算符,请参阅perlfunc).