use warning 可以导致警告升级为 error 退出。即使你没有写,可能底层某个模块用了。最好的解决方法是处理好 encode 和 print 的关系,保证打印的东西都做过 encode。
2009/8/18 yi wang <[email protected]> > 大家好! > 请教个问题: > 在一个大循环里嗲要用xml::smart,循环读取大量xml文件后写入新文件。 > 但是其中一个文件好像格式、编码不对, 程序报错“wide character in print at line” "unclosed token at > line 33507, at column 16, byte 1603043 at C:/perl/lab/xml/parser.pm line > 187", 然后就自动退出了。我的程序并没有任何“die”语句,请问是怎么回事?perll库函数不会采用错误就推出的策略吧?!如果是,如何让其不退出呢? > 谢谢! > > 王懿 > -- > 和你在一起 > > > > --~--~---------~--~----~------------~-------~--~----~ 您收到此信息是由于您订阅了 Google 论坛“PerlChina Mongers 讨论组”论坛。 要在此论坛发帖,请发电子邮件到 [email protected] 要退订此论坛,请发邮件至 [email protected] 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛 -~----------~----~----~----~------~----~------~--~---
