How do I use symbolic references in Perl?

后端 未结 7 1592
栀梦
栀梦 2020-12-02 02:02

In Perl, if a variable holds the name for another variable, how do I use the first variable to visit the other one?

For example, let

$name = \"bob\";         


        
7条回答
  •  天涯浪人
    2020-12-02 03:01

    Symbolic references are worth avoiding, but if you really want to use them, they have the same use syntax as regular references: see http://perlmonks.org/?node=References+quick+reference.

提交回复
热议问题