How do I read back in the output of Data::Dumper?

前端 未结 9 1608
暖寄归人
暖寄归人 2021-02-10 02:14

Let\'s say I have a text file created using Data::Dumper, along the lines of:

my $x = [ { foo => \'bar\', asdf => undef }, 0, -4, [ [] ] ];
9条回答
  •  猫巷女王i
    2021-02-10 03:03

    I think you want to put

    our $x;
    

    into your code before accessing x. That will satisfy the strict error checking.

    That being said, I join the other voices in suggesting Storable.

提交回复
热议问题