Chinaunix首页 | 论坛 | 博客
  • 博客访问: 835801
  • 博文数量: 253
  • 博客积分: 6891
  • 博客等级: 准将
  • 技术积分: 2502
  • 用 户 组: 普通用户
  • 注册时间: 2010-11-03 11:01
文章分类

全部博文(253)

文章存档

2016年(4)

2013年(3)

2012年(32)

2011年(184)

2010年(30)

分类: Python/Ruby

2011-10-25 09:30:31

  1. use Storable;
  2. my @data1 = qw /one own/;
  3. my @data2 = qw /two, too, to/;

  4. push @data1, \@data2;
  5. push @data2, \@data1;

  6. store [\@data1, \@data2], 'some_file';
  7. my $result = retrieve 'some_file';
  8. use Data::Dumper;
  9. $Data::Dumper::Purity = 1;
  10. print Dumper(@$result);
VAR1 = [
          'one',
          'own',
          [
            'two,',
            'too,',
            'to',
            []
          ]
        ];
$VAR1->[2][3] = $VAR1;
$VAR2 = $VAR1->[2];




阅读(851) | 评论(0) | 转发(0) |
0

上一篇:YAML

下一篇:引用:array, hash and subroutine

给主人留下些什么吧!~~