摘要: #!/usr/bin/perl$line = <STDIN>;if ($line eq "\n") {print "that was just a blank line!\n";} else {print "that line of input was :$line";} #!/usr/bin/perl$madonna = <STDIN>;if (defined ($mad... 阅读全文
posted @ 2010-07-27 14:56 waynechen 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 比较 数值 字符相等 == eq不等 != ne小于 < lt大于 > gt小于等于 <= le大于或等于 >= gechomp 去除字符串的换行符 阅读全文
posted @ 2010-07-27 14:43 waynechen 阅读(178) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/perl@lines = `perldoc -u -f atan2` foreach (@lines) {s/\w<([^>]+)>/\U$1/g;print;} 阅读全文
posted @ 2010-07-27 10:39 waynechen 阅读(197) 评论(0) 推荐(0) 编辑