chomp()

来源:互联网 发布:centos双ip双网卡 编辑:程序博客网 时间:2024/05/16 11:36

#!/usr/bin/perl
#chomp.cl
use strict;
use warnings;
while(my $a=<STDIN>)
{
#delete /n in every line
chomp $a;
print "your input is '$a'/n";
#exit this loop when your input is NULL
last if ($a eq '');
}

原创粉丝点击