perl next 循环

来源:互联网 发布:淘宝网站数据下载方法 编辑:程序博客网 时间:2024/05/18 02:17
v-dev-redis01:/root# cat x.pl open (LOG ,"<","/root/x.out");                      while (<LOG>) {                      chomp;     next if ($_ eq '192.168.32.5');    print "\$_ access $_\n";}v-dev-redis01:/root# cat x.out 192.168.32.1192.168.32.2192.168.32.3192.168.32.4192.168.32.5192.168.32.6192.168.32.7v-dev-redis01:/root# perl x.pl $_ access 192.168.32.1$_ access 192.168.32.2$_ access 192.168.32.3$_ access 192.168.32.4$_ access 192.168.32.6$_ access 192.168.32.7

0 0
原创粉丝点击