chomp的用法

perl中chomp用來去除字符串後面的換行符。html 如如下代碼ubuntu #!/usr/bin/perl -w $a = <stdin>; print "first input is $a"; $b = <stdin>; #chomp $b; print "second input is $b"; #!運行的結果是: xy@ubuntu:~/perl代碼$ perl chomp 12
相關文章
相關標籤/搜索