Chinaunix

标题: 简单代码关闭所有print 到命令行窗口 [打印本页]

作者: crmchan    时间: 2017-03-02 20:53
标题: 简单代码关闭所有print 到命令行窗口
大神

请问有什么方法比较简单,可以关闭所有print 到命令行窗口(以前代码里面print函数比较多)
或者 有什么办法让它输出到新的命令行窗口。

现在使用其它语言exec调用perl,perl阻塞了(简单perl 能立马打印,但复杂perl 阻塞了)

谢谢!!

作者: jason680    时间: 2017-03-02 21:55
回复 1# crmchan

$ perldoc -f select
    select FILEHANDLE
    select  Returns the currently selected filehandle. If FILEHANDLE is
            supplied, sets the new current default filehandle for output. This
            has two effects: first, a "write" or a "print" without a
            filehandle default to this FILEHANDLE. Second, references to
            variables related to output will refer to this output channel.
    ...





欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2