例如,如何在资源管理器和编辑器之间切换,或者在编辑器和终端之间切换?
如果我在 Unix/Linux 系统上的 Perl 脚本中执行此操作:
open(my $fh, 'cat|');
Run Code Online (Sandbox Code Playgroud)
是否涉及外壳?如果没有,那怎么办:
open(my $fh, 'cat -v|');
Run Code Online (Sandbox Code Playgroud)
如果可能的话,我想避免使用 shell,我什至知道该怎么做:
open(my $fh, '-|') || exec('cat', '-v');
Run Code Online (Sandbox Code Playgroud)
但简洁也很有价值。