|
ru.perl- RU.PERL ---------------------------------------------------------------------- From : Dmitry Tweritin 2:5020/1978.15 30 Oct 2000 21:56:44 To : Yaroslav Polyakov Subject : Re: Вопрос по таблице символов (typeglob) --------------------------------------------------------------------------------
YP> Как правильно обратиться к таблице символов, чтобы получить ссылку на
YP> переменную, объявленную my?
Hикак, нет ее там. Кусок из 'Advanced Perl Programming':
3.1.1 Lexical Variables
Lexical variables (those tagged with my) aren't listed in the symbol table at
all. Every block and subroutine gets a list of one or more arrays of variables
called scratchpads (typically one, but more if the subroutine recurses). Each
lexical variable is assigned one slot from a scratchpad; in fact, different
types of variables with the same name - $spud and %spud, say - occupy different
slots. Since a subroutine's lexical variables are independent of any other's, we
get truly local variables. We will have more to say on this subject in Chapter
20, Perl Internals.
snaky
---
* Origin: Don't worry, the next message will be better. (2:5020/1978.15)
Вернуться к списку тем, сортированных по: возрастание даты уменьшение даты тема автор
Архивное /ru.perl/2789339fdb6db.html, оценка из 5, голосов 10
|