$ perl -MO=Concise -e 'print reverse (1,2,3)'
a  <@> leave[1 ref] vKP/REFC ->(end)
1     <0> enter ->2
2     <;> nextstate(main 1 -e:1) v:{ ->3
9     <@> print vK ->a
3        <0> pushmark s ->4
8        <@> reverse[t1] lK/1 ->9
4           <0> pushmark s ->5
5           <$> const[IV 1] s ->6
6           <$> const[IV 2] s ->7
7           <$> const[IV 3] s ->8
-e syntax OK


2009/9/15 Michael Zeng <[email protected]>

> 大牛解释下
> 堆栈运行方式有什么独特之处?
>
>
>
> 2009/9/15 joe jiang <[email protected]>
>
> Perl 语言的工作机制比较独特,如果不明白它的堆栈运行方式,以及各种语境 (context)
>> 下的功能,就去看代码,可能会比较困惑。建议从其他的地方找源代码。
>>
>> 因为 larry wall 是著名的 C 语言玩家 :)
>>
>> 2009/9/14 Michael Zeng <[email protected]>
>>
>>>  好像是op.c 和opcode.h
>>>
>>> 不清楚,因为我不懂c 语言
>>>
>>> 还用 File::Find 去查那些文件包含reverse 关键字
>>>
>>>
>>>
>>>
>>>  2009/9/14 Allen <[email protected]>
>>>
>>>>  多谢指教,我从cpan上下载了源码。
>>>> 能否告诉我一个入口?从哪里查询或者开始阅读?我如果在所有文件的话搜索 reverse 话,有很多无用信息,不知道从哪里看起?
>>>>
>>>> On 9月13日, 下午6时35分, joe jiang <[email protected]> wrote:
>>>> > active perl don't have source code.
>>>> > need to read it? download source code from cpan
>>>> >
>>>> > 2009/9/13 Allen <[email protected]>
>>>> >
>>>> >
>>>> >
>>>> > > 各位前辈,我想学习下Perl中reverse的实现方法,想学习下,我怎么查看源码呢?
>>>> > > 我是windows平台,安装的是active perl 5.8- 隐藏被引用文字 -
>>>> >
>>>> > - 显示引用的文字 -
>>>>
>>>> --
>>>>            Yours Sincerely
>>>>                    Zeng Hong
>>>>
>>>>
>>>>
>>
>>
>> --
>>            Yours Sincerely
>>                    Zeng Hong
>>
>> >>
>>

--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛“PerlChina Mongers 讨论组”论坛。
 要在此论坛发帖,请发电子邮件到 [email protected]
 要退订此论坛,请发邮件至 [email protected]
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

回复