Chinaunix首页 | 论坛 | 博客
  • 博客访问: 69355
  • 博文数量: 27
  • 博客积分: 1096
  • 博客等级: 少尉
  • 技术积分: 280
  • 用 户 组: 普通用户
  • 注册时间: 2008-07-13 19:21
文章分类

全部博文(27)

文章存档

2011年(1)

2008年(26)

我的朋友

分类:

2008-07-14 11:15:52

正常写法:
[root@trffic2 perl]# cat three.pl
#!/usr/bin/perl

if(1>0.1){
print "yeah\n";
}
else{
print "sorry\n";
}
变态写法:
方法一、
[root@trffic2 perl]# cat threeif.pl
#!/usr/bin/perl
(1>0.1)?print "yeah\n":print "sorry\n";
方法二、
[root@trffic2 perl]# cat t.pl
#!/usr/bin/perl
(1>0.1)?do{print "yeah\n"}:do{print "sorry\n"};
阅读(798) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~