从
http://stackoverflow.com/questions/2242812/why-do-i-have-to-use-a-in-front-of-a-perl-bareword-filehandle
这个页面能得到一些解释
在 2012-12-3 下午10:47,"方及道" <[email protected]>写道:
>
> #!/usr/bin/perl
>
> ABC->type;
> "ABC"->type;
>
> package ABC;
> sub type {
> print "class ABC\n";
> }
>
> 输出:
> class ABC
> class ABC
>
> 请问,为什么“ABC"->type 也被识别为类调用?
>
> --
> 您收到此邮件是因为您订阅了 Google 网上论坛的“PerlChina Mongers 讨论组”论坛。
> 要在网络上查看此讨论,请访问 https://groups.google.com/d/msg/perlchina/-/t_T91J6v0G4J。
> 要向此网上论坛发帖,请发送电子邮件至 [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 访问此网上论坛。