2008年10月10日星期五

[PerlChina] 答复: 请教大家问题

System 方式的话 至少我可以知道命令是否正常退出
$status = system
后续可以做一些事情 if ( $status == 0 ) ...

`` 方式有什么办法?

-----邮件原件-----
发件人: china-pm-bounces+jacky.xu=serversupport.cn@pm.org
[mailto:china-pm-bounces+jacky.xu=serversupport.cn@pm.org] 代表 Jeff Peng
发送时间: 2008年10月10日 15:48
收件人: china-pm@pm.org
主题: Re: [PerlChina] 请教大家问题

jacky.xu 写道:
> 有个疑问请教大家
>
>
>
> ...
> open $somefile, ">file";
> select $somefile;
> system "ls","-lrt";
> System调用的ls �lrt 会把输出丢到 默认的 STDOUT 也就是屏幕上 ,有什么办法
丢会我打开的文件?
>
>

因为system打开的是另一组输入/输出。
try:
my @output = `ls -ltr`;
print $somefile @output;


>
> 另外
>
> <china-pm@pm.org>:
> 216.52.237.216 failed after I sent the message.
> Remote host said: 552 spam score exceeded threshold (#5.6.1)
>
> --- Below this line is a copy of the message.
>
>
> 这个咋回事? 我越线了?

这是一个垃圾邮件评分规则,根据邮件不同特征进行打分,超过一定分数则认为是
疑似垃圾邮件。很可能对方采用的SpamAssassin反垃圾系统(也是Perl写的,规则
超强)。
_______________________________________________
China-pm mailing list
China-pm@pm.org
http://mail.pm.org/mailman/listinfo/china-pm

没有评论: