1
你好我試圖引用一個結構的哈希數組,但是當我需要寫它時不起作用。引用散列結構類
use warnings;
use Class::Struct;
struct lib => {
content => '$',
type => '$',
};
my %library ;
$library{"one"} = lib->new();
$library{"one"}->content("first text here \n");
my $ref = \$library{"one"}->content();
print $$ref ;
$$ref = "Second text\n" ;
print $$ref ;
print $library{"one"}->content() ;
如何更新內容的參考?
非常感謝你了。它的效果很好 – hrodic 2015-03-02 22:07:30