What is the difference between lexical and dynamic scoping in Perl?

后端 未结 3 612

As far I know, the my operator is to declare variables that are truly lexically scoped and dynamic scoping is done using the local operator to decl

3条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-04 03:48

    MJD explained this in 1998:

    my creates a local variable. local doesn't.

提交回复
热议问题