Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
好的,这就是我想要做的:
我有一封带有一系列 MIME 附件的电子邮件。我有示例代码,可以帮助我创建一个包含解码附件的目录;我现在需要做的是将该目录的内容发送到 lpr。(我没有筛选出错误的文件格式;我将其留给后台处理程序守护进程处理。)
如何使用glob:
glob
my @files = glob($decode_directory/*); system "lpr", @files;
您可以使glob论点更具选择性。system因此编写的函数避免了启动 shell 并lpr直接运行命令。
system
lpr