Chinaunix首页 | 论坛 | 博客
  • 博客访问: 855442
  • 博文数量: 253
  • 博客积分: 6891
  • 博客等级: 准将
  • 技术积分: 2502
  • 用 户 组: 普通用户
  • 注册时间: 2010-11-03 11:01
文章分类

全部博文(253)

文章存档

2016年(4)

2013年(3)

2012年(32)

2011年(184)

2010年(30)

分类: Python/Ruby

2011-10-10 13:10:17

$! hold the failure message.


quit the program; There’s one more thing that die will do for you: it will automatically append the Perl
program name and line number† to the end of the message, so you can easily identify
which die in your program is responsible for the untimely exit.(give the name and line number)

  1. @ARGV > 2 or die "not enough";

  2. not enough at die.pl line 1.
The warn function works just like die does, except for that last step—it doesn’t actually
quit the program. But it adds the program name and line number if needed, and it prints
the message to standard error, just as die would.
阅读(481) | 评论(0) | 转发(0) |
0

上一篇:filehandle: open close

下一篇:Special Vars

给主人留下些什么吧!~~