文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>perl open |

perl open |

时间:2009-07-29  来源:huanghaojie

If the filename begins with '|' , the filename is interpreted as a command to which output is to be piped, and if the filename ends with a '|' , the filename is interpreted as a command which pipes output to us.

将打开文件的流重定向到后面的shell语句
#!/usr/bin/perl
open F , "|cat" or die "error to open";
print F "aaaa\n";
close F;

将shell语句的内容重定向到流
#!/usr/bin/perl
open FF , "ls |" or die "error to open";
print <FF> ;
close FF;
相关阅读 更多 +
排行榜 更多 +
暗夜格斗手游

暗夜格斗手游

棋牌卡牌 下载
魔渊之刃手游

魔渊之刃手游

角色扮演 下载
像素火影次世代手游版

像素火影次世代手游版

体育竞技 下载