管道问题,这是Perl中的一个错误 [英] Pipe problem, Is it a bug in Perl

查看:93
本文介绍了管道问题,这是Perl中的一个错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我有一个C程序,它不断地将已完成作业的百分比返回到我的Perl脚本中,所以为了执行这个程序,我有以下几行:

Hello everyone,

I have a C program that constantly returned the % of the job completed to my Perl script so to execute this program I have these lines:

展开 | 选择 | Wrap | 行号

推荐答案

我从来没有像你一样使用IO :: Handle。我一直用它来创建一个IO :: Handle对象并在对象上使用方法。但是,由于您正在使用管道,请查看IO :: Pipe,它也是一个核心模块。

http://perldoc.perl.org/IO/Pipe.html


您也可以使用open(并且不使用IO模块。

I''ve never used IO::Handle like you are doing. I have always used it to create an IO::Handle object and use methods on the object. But since you are using a pipe, look into IO::Pipe, which is also a core module.

http://perldoc.perl.org/IO/Pipe.html

You could also just use open() and not use a IO module.

展开 | 选择 | Wrap | 行号


同样的问题。在C程序完成运行之前,输出未显示在屏幕上。还有其他任何建议吗?
Same problem. The output did not get displayed on the screen until the C program finished running. Any other suggestions?


你是从网络浏览器还是从命令行运行它作为cgi?
are you running this as a cgi from the web browser or from the command line?


这篇关于管道问题,这是Perl中的一个错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆