perl 的运行环境和 tcl, python 不同,不是交互式的,

通常都是全写完  在一次性 调试,编译,运行的


最简单的perl交互式运行, 是用eval,
自己可以写一个简单的 交互式环境, 如:

while ( <> ) {
     eval  ;
     print $@ if  $@ ;  # if code error ,

}


另外 :如果你要换行写, 要 单独处理 \ , 代码还得修改,







2011/2/27 Achilles Xu <[email protected]>

> perl6
>
> 在 2011年2月27日 下午10:59,万��新 <[email protected]>写道:
>
> perl -de 0
>>
>> 2011/2/27 rochelle hsu <[email protected]>
>>
>>  perl -d?
>>> 在 2011-2-27 下午8:23,"Cond0r" <[email protected]>写道:
>>>
>>> --
>>> 您收到此邮件是因为您订阅了 Google 网上论坛的“PerlChina Mongers 讨论组”论坛。
>>> 要向此网上论坛发帖,请发送电子邮件至 [email protected]。
>>> 要取消订阅此网上论坛,请发送电子邮件至 [email protected]。
>>> 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。
>>>
>>
>> --
>> 您收到此邮件是因为您订阅了 Google 网上论坛的“PerlChina Mongers 讨论组”论坛。
>> 要向此网上论坛发帖,请发送电子邮件至 [email protected]。
>> 要取消订阅此网上论坛,请发送电子邮件至 [email protected]。
>> 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。
>>
>
>
>
> --
> ---------------------------
> Achilles Xu
>
>
> --
> 您收到此邮件是因为您订阅了 Google 网上论坛的“PerlChina Mongers 讨论组”论坛。
> 要向此网上论坛发帖,请发送电子邮件至 [email protected]。
> 要取消订阅此网上论坛,请发送电子邮件至 [email protected]。
> 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。
>



-- 
            Yours Sincerely
                    Zeng Hong

-- 
您收到此邮件是因为您订阅了 Google 网上论坛的“PerlChina Mongers 讨论组”论坛。
要向此网上论坛发帖,请发送电子邮件至 [email protected]。
要取消订阅此网上论坛,请发送电子邮件至 [email protected]。
若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。

回复