How do I use symbolic references in Perl?

后端 未结 7 1469
栀梦
栀梦 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:07
    no strict 'refs';
    print "$name is @$name\n";
    
    0 讨论(0)
提交回复
热议问题