美文网首页
Complex data structures-----scal

Complex data structures-----scal

作者: 余绕 | 来源:发表于2020-04-21 16:38 被阅读0次
use Data::Dumper;
$gene=[

{
name=>'Jim',
location=>'US',
jobs=>'student'


}
,
'high',

['gene1','gene2','gene3','gene4','gene5']

];

print"Name is ",$$gene[0]{'name'},"\n";


print"The second element is ",$$gene[1],"\n";

print"The second element of third element is ",$$gene[2][2],"\n";

print Dumper($gene);


#############打印结果################


Name is Jim                                                    
The second element is high                                     
The second element of third element is gene3                   
$VAR1 = [                                                      
          {                                                    
            'name' => 'Jim',                                   
            'location' => 'US',                                
            'jobs' => 'student'                                
          },                                                   
          'high',                                              
          [                                                    
            'gene1',                                           
            'gene2',                                           
            'gene3',                                           
            'gene4',                                           
            'gene5'                                            
          ]                                                    
        ];                                                     

相关文章

网友评论

      本文标题:Complex data structures-----scal

      本文链接:https://www.haomeiwen.com/subject/sufpihtx.html