美文网首页
Complex data structure------Hash

Complex data structure------Hash

作者: 余绕 | 来源:发表于2020-04-21 16:09 被阅读0次
use Data::Dumper;
%relatedgenes=();
$relatedgenes{'one'}=[1,2,3,4];
$relatedgenes{'two'}=[12,13,14,10];
push @{$relatedgenes{'two'}},'2121';

print Dumper(\%relatedgenes);

$VAR1 = {
          'one' => [
                     1,
                     2,
                     3,
                     4
                   ],
          'two' => [
                     12,
                     13,
                     14,
                     10,
                     '2121'
                   ]
        };



相关文章

网友评论

      本文标题:Complex data structure------Hash

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